Thursday, June 24, 2010

How to simulate speech Echo in VBA

The following snippet simulates ( a sort of ) the Echo effect in VBA. This uses Microsoft Speech Object Library

Sub Voice_It_Out()

Dim oVoice As SpVoice                               ' Voice Object

' --------------------------------------------------------------
' Code for
' --------------------------------------------------------------

Set oVoice = New SpVoice

For iVol = 100 To 10 Step -10
    oVoice.Volume = iVol
    oVoice.Speak "Echo!"
Next iVol

End Sub

No comments:

Post a Comment

Share on Facebook
Related Posts Plugin for WordPress, Blogger...

Visual Basic for Applications (VBA) Forum (recent threads)

CodeKeep VBA Feed

Visual Studio Tools for Office Forum (recent threads)

Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.

Office Business Applications (OBA) Team Blog

MSDN Code Gallery Published Resources For Tag VSTO Google Group