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
WORD 2003
Al
Jean-Guy Marcil - 15 Feb 2007 02:56 GMT
A was telling us:
A nous racontait que :
> This great macro:
> Sub ReadToMe()
[quoted text clipped - 9 lines]
> 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

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Steve Yandl - 15 Feb 2007 19:18 GMT
The object created does have a 'pause' method and a 'restore' method.
However, the few times I've used it, I simply supplied it with small enough
text strings that I didn't see the need to stop it (you could break down a
large selection into a collection of sentences perhaps).
By the way, you should add the line suggested by Jean-Guy Marcil to set the
object to nothing at the end of the subroutine. I don't think it will solve
your problem but I should have included it when I initially provided you the
sample subroutine.
Steve Yandl
> This great macro:
> Sub ReadToMe()
[quoted text clipped - 13 lines]
>
> Al
Graham Mayor - 16 Feb 2007 07:17 GMT
See http://www.gmayor.com/word_text_to_speech.htm

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> This great macro:
> Sub ReadToMe()
[quoted text clipped - 13 lines]
>
> Al