Name
speech
.Speak(Text
, [SpeakAsync
], [SpeakXML
], [Purge
])
Synopsis
Reads text out loud.
Argument |
Settings |
---|---|
|
The text to read out loud. |
|
True executes the next statement without waiting for the reading to complete; False pauses code until |
|
True interprets |
|
True stops the current text being read and starts reading the new text immediately; False waits for current text to complete before reading new text. Default is False. |
The following code reads a short poem:
Sub ReadPoem( ) Dim spch As Speech, poem As String Set spch = Application.Speech poem = "Some men lead lives of quiet desperation. " & _ "Our Joey lays in silent anticipation, " & _ "of morsels dropped from Sophie's eating station." spch.Speak poem End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.