Article ID: 287120 - Last Review: October 23, 2006 - Revision: 3.1 How to automate Excel Text to Speech in another Office programThis article was previously published under Q287120 On This PageSUMMARY This step-by-step article explains how you can use the Text
to Speech functionality of Microsoft Excel in other programs, including
Microsoft Word, Microsoft PowerPoint, and Microsoft Outlook. Microsoft Excel is the only Microsoft Office XP program that has built-in Text to Speech (TTS) capabilities. This article explains how you can use OLE Automation to programmatically access the Excel object model and use the Text to Speech functionality in other programs. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Use Text to Speech in PowerPointThe following example uses the Excel object model to access Text to Speech from a PowerPoint presentation. This procedure demonstrates how to reference and create an Excel object in order to use the Speech object.Insert a Module into a PowerPoint Presentation
Add a Reference to Excel 10 Object Library
Sub Procedure to Automate Excel Text to Speech from PowerPointThe following example assumes that your PowerPoint presentation has two slides.
Use Text to Speech in WordThe following example uses the Excel object model to access Text to Speech from a Word document. This procedure demonstrates how to reference and create an Excel object in order to use the Speech object.Insert a Module into Word
Add a Reference to Excel 10 Object Library
Sub Procedure to Automate Excel Text to Speech from WordThe following example assumes that you type text in your Word document and then select the text before you run the Sub procedure.
REFERENCESFor additional information, click the article number below to view the article in the Microsoft Knowledge Base:277808
(http://support.microsoft.com/kb/277808/EN-US/
)
XL2002: "Run-time Error 1004" When You Attempt to Use Text to Speech in Macro
For
additional information about getting help with Visual Basic for Applications,
click the following article number to view the article in the Microsoft
Knowledge Base: 163435
(http://support.microsoft.com/kb/163435/
)
Programming resources for Visual Basic for Applications
| Article Translations
|

Back to the top
