SPEECH problem

A

AP

The following macro causes "Run-time error '1004': Application-defined or
object-defined error"

Sub UseSpeech()

Application.Speech.Speak "Hello"

End Sub

I have "Microsoft Sam" installed and working in the control panel's speech
section (the speech preview works fine). I'm using Office 2003 Students &
Teachers. Any help would be greatly appreciated. Thanks.
 
N

NickHK

Text to speech is an optional component during the install. Run the
Office/Excel install again and check that component is installed.
Not sure if it's available with your version of Excel though.

NickHK
 
A

AP

Thanks Nick,

I've checked the box in which the software came and it says its the "full
versions of our latest Office products" (I bought it several months ago just
before the release of Vista).

I've also gone to the control panel to re-install and could see that the
speech component is already installed. Can you think of any other reason why
it doesn't work ? Thanks for your help.

AP
 
N

NickHK

For me, if that component is installed the code works.
Uninstall it and the code fails with your error.

Not much more I can offer.

NickHK
 
A

AP

The trick is:

By default, the Text-To-Speech component is set to "Installed on first
use" - this causes the runtime error 1004. Although the speech preview in
the control panel works, the speech macro in Excel doesn't (runtime error
1004).

However, if you change the Text-To-Speech component to "Run from MyComputer"
then the error disappears altogether (the application.speech.speak "Hello"
code works)

Hope anybody with this problem learns from this.

Cheers,
AP
 

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

Similar Threads

Text to Speech 2
Question about Speech 3
Speaking error?!? 6
Application.Speech 2
Dynamic Autofill Error 1
Excel 2007 - Dynamic sheet naming 1
Macro Runtime errors 8
Speech Therapy 0

Top