My excel has text to speech, but I can't find the same thing in Word (XP).
Where is it hidden?

many thanks


Rod

Re: Text to speech by Mike

Mike
Wed Oct 22 04:30:52 CDT 2003

Rod wrote:
> My excel has text to speech, but I can't find the same thing in Word
> (XP). Where is it hidden?

Not provided - and it's not in Word 2003 either


Mike Williams - Office MVP
http://www.mvps.org/

Please respond in the same thread on this newsgroup. Make sure you
include details of your application and Windows versions, and whether
or not you have included any service pack updates.



Re: Text to speech by Rod

Rod
Wed Oct 22 04:37:51 CDT 2003

Thanks for your reply.
Do you happen to know if there is any logic behind that decision as the
other way around would have been more useful.






"Mike Williams [MVP]" <mikew@[removeme]mvps.org> wrote in message
news:#n$ux8HmDHA.744@tk2msftngp13.phx.gbl...
> Rod wrote:
> > My excel has text to speech, but I can't find the same thing in Word
> > (XP). Where is it hidden?
>
> Not provided - and it's not in Word 2003 either
>
>
> Mike Williams - Office MVP
> http://www.mvps.org/
>
> Please respond in the same thread on this newsgroup. Make sure you
> include details of your application and Windows versions, and whether
> or not you have included any service pack updates.
>
>



Re: Text to speech by Mike

Mike
Wed Oct 22 04:43:35 CDT 2003

Rod wrote:
> Thanks for your reply.
> Do you happen to know if there is any logic behind that decision as
> the other way around would have been more useful.

I think it was to help all those accountants who like to have columns of
figures read back to them. Personally I prefer Proust.

Mike Williams - Office MVP
http://www.mvps.org/

Please respond in the same thread on this newsgroup. Make sure you
include details of your application and Windows versions, and whether
or not you have included any service pack updates.



RE: Text to speech by anonymous

anonymous
Fri Oct 24 16:31:05 CDT 2003

Text to speech can be added to Word. It works via a micro and you must mark the speech before playback. The details on adding the macro are at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;287120&Product=offxp#6
The process is not as tedious as it first appears and it works fine.

Jimmy

Re: Text to speech by mjheikkila

mjheikkila
Thu Nov 13 13:20:27 CST 2003

Re: getting Text to Speech to work in Word

The method described in the KB article mentioned above has you
starting up an Excel application to get speech. Here is a method to do
it just within Word:

The following applies to WordXP:
Go to the VBE (Alt+F11)
Add a reference in the normal project to Microsoft Speech Object
Library
(note: you must have installed the Speech portion of Excel for this
reference to be available.)
Create a new module
Insert the following code:
'Code Start =============================================
Dim speech As SpVoice

Sub SpeakText()
'
' Macro2 Macro
' Macro recorded 10/20/2003 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(1,
ActiveDocument.Characters.Count).Text, _
SVSFlagsAsync + SVSFPurgeBeforeSpeak
End If

Do
DoEvents
Loop Until speech.WaitUntilDone(10)

Set speech = Nothing
End Sub

Sub StopSpeaking()
'used to interupt any running speach to text
'Dim speech As New SpVoice
On Error Resume Next
speech.Speak vbNullString, SVSFPurgeBeforeSpeak
Set speech = Nothing
End Sub

'Code End ====================================================

Now all you need are two toolbar buttons or menu items that run the
macros.
The SpeakText macro will speak the current selection, or the entire
document if nothing is selected.
The StopSpeaking macro will stop it.

Hope this can help anyone else who was as frustrated as me that Excel
had this feature but not Word.

Yes, its crude regarding the error trapping and using a global
variable. If anyone has a cleaner way, please post a reply. The whole
reason for this was to be able to stop the speaking. Simply creating a
new voice object and setting the PurgeBeforeSpeak flag did not work.
If the ASync flag is not turned on the in the speaktext macro, you
have to wait for it to finish before you can do anything else in Word.

Matt