Name

Application.Speech

Synopsis

Returns a Speech object that can be used to say words. Using Speech causes an error if the feature is not installed. The following code tries to say “Hazelnootpasta”:

Sub TestSpeech(  )
    On Error Resume Next
    Application.Speech.Speak "Hazelnootpasta"
    If Err Then MsgBox "Speech not installed."
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.