Jean-Guy
Wed Feb 14 20:56:48 CST 2007
A was telling us:
A nous racontait que :
> This great macro:
> Sub ReadToMe()
> Set objRange = Selection.Range
> strText = objRange.Text
> Set objVoice = CreateObject("SAPI.SpVoice")
> objVoice.Speak strText
> End Sub
>
> From Steve Yandl
>
> Speaks the selected text
> However, I cannot stop it once it starts.
> How does one kill a macro
What do you mean by "I cannot stop it once it starts"?
Does it repeat the text ad infinitum?
Just in case, have you tried:
Sub ReadToMe()
Dim objRange As Range
Dim strText As String
Dim objVoice As Object
Set objRange = Selection.Range
strText = objRange.Text
Set objVoice = CreateObject("SAPI.SpVoice")
objVoice.Speak strText
Set objVoice = Nothing
End Sub
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org