text-to-speech utility in word 2003

G

Guest

In MS Excel above utility could be activated by going to tools Speach and
selecting text to Speach tool bar. But I could not find this facility in word
2003. Is thertea way to get this fixed?
Thanks. Hawk
 
Joined
Jan 11, 2011
Messages
1
Reaction score
0
hi
the only way i have tried and it worked out with me is to create a macro for reading and stop reading the text.
i should refer to source of these information http://www.gmayor.com/word_text_to_speech.htm
the summary would be
1)open the vba editor in macros( tools-macros-vba editor) or simply(alt+f11)
2)put cheeck mark on (tools-refrences-microsoft speech object library)
2) create a module call it texttospeech in this macro
3)write the following code inside this module

Dim speech as SpVoice 'Don't overlook this line!


Sub SpeakText()
'Based on a macro by Mathew Heikkila
'

On Error Resume Next
Set
speech = New SpVoice
If Len(Selection.Text) > 1 Then 'speak selection
speech.Speak Selection.Text, _
SVSFlagsAsync + SVSFPurgeBeforeSpeak
Else 'speak whole document
speech.Speak ActiveDocument.Range(0, ActiveDocument.Characters.Count).Text, _
SVSFlagsAsync + SVSFPurgeBeforeSpeak
End If
Do

DoEvents
Loop Until speech.WaitUntilDone(10)
Set speech = Nothing
End Sub



Sub StopSpeaking()
'Based on a macro by Mathew Heikkila
'used to interrupt any running speech to text

On Error Resume Next
speech.Speak vbNullString, SVSFPurgeBeforeSpeak
Set speech = Nothing
End Sub




i hope this would answer your question
wisam khalid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top