Skip to content

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, and I can’t see any reason why it won’t!

Editor’s note here, 2018. I still can’t get this thing to run with the Office 2003 suite of programs, worked fine with 2000, but the Macro adamantly refuses to work with the newer  suites.

  • As such, I have been reduced to using ClaroRead, but if you read this, and get it to work: then please eMail me on how you did it.

Original article from 2011 continues.

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 was in itself , was a direct pull from the original article …

http://support.microsoft.com/?kbid=287120 : that then spawned the function below, and was written by Matthew Heikkila. All I’ve done to improve it: is that the Macro now starts from the Cursor,  instead of the Beginning of the Document, which was silly.

————[ General Observations: Do Not Overlook  ]————

System Requirements:

You are XP, and Service Pack 3 is installed.

  • It was 2011 when this was written, but even Win 10 has issues with it.

Microsoft Office 2000 [Word and Excel must be installed].

  • As I say: more insurmountable issues.

If you run your system as a  ‘Guest’ and ‘Admin’, then read NOTE 3 below, 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 the 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, the bottom one is called ‘Properties Module1’ – and is for reference only.

Follow the objects listed.

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

Opens new window in the main pane, paste in the text shown as 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’s 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 DataMicrosoftTemplates

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 DataMicrosoftTemplates

Rename the file there called Normal.dot to something like Normal-dot.old – then (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 DataMicrosoftTemplates

… 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 DataMicrosoftTemplates

RTFM – Or don’t even attempt this!

  • Authors note in 2018:  and all of the above is now blown out of the water with the arrival of Windows 8, (spit!) – 8.1 (double spit), and finally Win 10, here I’ve run out of spit, and am merely salivating with frustration.

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

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’s awful]. The Macro, once activated: speaks from ‘the Cursor’ in Works 2000 and is Free Speech.

Thanks for reading, Jessica: Praise be the ORI.

 

Spread the love, and the message.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.