Free Speech:

Here’s a Macro: It will produce a function giving you the ability to hear your text being read to you in Word 2000:  Should work in 2003 -> 2007 -> and 2010: I can’t see any reason why it won’t!

NOTE 1: This article requires you to read, and implement the code in full. It’s all here, don’t ask any stupid questions. I won’t answer them.

NOTE 2: It’s NOT my work and is a direct pull from …

http://www.gmayor.com/word_text_to_speech.htm

Which is a direct pull from the original article from …

http://support.microsoft.com/?kbid=287120 : Which spawned the function below and was written by Matthew Heikkila. All I’ve done to improve it: The Macro now start from ‘the Cursor’ instead of the Beginning of the Document. 

————[ General Observations: Do not overlook  ]————

 System Requirements:

XP service pack 3 must be Installed:

Microsoft Office 2000 [Word and Excel must be Installed]

[If you run your system as a  ‘Guest’ and ‘Admin’ read below, NOTE 3: Before going any further.]

————[ General Observations: Do not overlook  ]————

Begin  {_=*(:_:)*=_}  Start Word 2000.

From a blank page with Word running : Press – ‘Alt-F11’ [this opens Microsoft visual basic window]

From the top Menu Bar -> Tools  [Drop down menu] -> [Select] Reference:

[This opens up a pop up Box] Scroll down, Find and Select: then Click.

‘[x] Microsoft Speech Object Library’:

Press OK:

On the left hand side of the screen are two side windows: Select the top one called Project  – Project.

bottom one called ‘Properties Module1’ – for reference only:

Follow the objects listed.

Project (Document1) -> Modules -> [ ‘right-click’ -> Insert ‘Module’ ] 

Opens new window in the main pane: Paste the text shown below:

—————[cut start] —–  [don’t include this part]

Dim speech As SpVoice ‘Don’t overlook this line!
Sub SpeakText()
‘ Based on a macro by Mathew Heikkila
‘ My version reads from the Screen Cursor:

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(ActiveDocument.Bookmarks(“\startOfSel”).Start, _
    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

—————[end cut]—–  [don’t include this part]

Simply close the window — You should now have a something called ‘Module1’ under ‘Modules’

That it! – Next Assign it to your key strokes. Now its been suggested that you create a Macro then Assign it to a Menu-Bar? – Why the heck would you want to do that? – Assign it to a Key-Board combination instead.

From Top Menu in Word:

Select Tools: Drop down menu to -> Customise: -> [ Shown Below ]

Select Keyboard: [ Shown ] Scroll down to Macros:

Assign Keyboard ‘Key strokes:’

Select: the Box labelled: ‘Press New short cut key’: and assign you short cut keys for activating the Macro: I’ve used ‘CTRL-SPACEBAR’: So I pressed that combination in the box. Once the keystrokes are in the Box – the [Assign] button above will be enabled. Click it and move on to the assigning your ‘Stop Speaking Macro’ Keyboard combination. For that I used CTRL-ALT-SPACEBAR assigning : But it’s your choice here.

——————————————————————

NOTE 3: ADMINISTRATOR NOTE: Now if you run your system as ‘Admin’ and ‘Guest User’ then you’ll have a few problems in assigning and implementing changes in Word: As you run Word from a guest account Word creates a Normal.dot file on each run, and this file is basic: It also can’t be changed with your privileges that the Guest Account allocates. So it you try to assign Macros to keystrokes or MenuBar then the changes are ignored, but it says nothing and you’ll go quietly daft as you can’t see why your simply Macro assignments are ignored.

Here’s a work round:

Log in as Admin. Open Word: Create your ‘Speak functions’ as described above. Create your ‘Macro keyboard assignments’ as described above. Test that your Key-Strokes Work. Do they? …And you can hear the voice reading your Text? … Then Close Word:

Still logged in as Admin. Locate the directory/folder:

C:\Documents and Settings\[Admin]\Application Data\Microsoft\Templates

Copy the file there, called Normal.dot: Select it, and either ‘Right Click’ -> Copy: Or be professional, and press CTRL-C:

Locate the directory/folder.

C:\Documents and Settings\[Guest User]\Application Data\Microsoft\Templates

Rename the file there called Normal.dot to something like Normal.dot.old – The Right Click your Mouse and Select Paste: Or be professional, and press CTRL-V. These actions will ‘Paste’ the file called ‘Normal.dot’ from the ‘Admin directory’ to this ‘directory’.

Log out, and off as Admin. Now Log back in as as your Guest User: Open Word and test your key-strokes. Note that even thought you would think that Word ‘Admin’ and Word ‘User’ would be the same, they are not! You have to enter the Visual Basic functions twice, but the Macro Assignments only once? Go figure!

——————————————————————

NOTE 4: Sigh! Come on People! – I shouldn’t need to explain this, but ‘Admin Account’ is the Admin ‘log in/on’ name you use when you log in to your XP. So, if your Admin name is ‘FRED’; then the path to the Fred Admin account would be.

C:\Documents and Settings\Fred\Application Data\Microsoft\Templates

… And so if follows if you log in as your Guest Account as ‘Joe’ then the path to the Joe Guest Account is.

C:\Documents and Settings\Joe\Application Data\Microsoft\Templates

RTFM … or don’t even attempt this!

——————————————————————

A Review:

This macro uses the EXCEL speech package. It relies on the installed voice of SAM: It’s there automatically. It is shit! [sorry, but it’ awful] The Macro, once activated: Speaks from ‘the Cursor’ in Works 2000 and is Free Speech.

Thanks for reading, Jessica : Praise be the ORI:

Copyright © Mrs Jessica Simpson.
All rights reserved, from the year
Share

Comments

Free Speech: — 1 Comment

  1. Pingback: Right here – Read Now! | eBooks