NamedRange.Speak Method (2007 System)

Causes the cells of the NamedRange control to be spoken in row order or column order.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Sub Speak ( _
    SpeakDirection As Object, _
    SpeakFormulas As Object _
)
'Usage
Dim instance As NamedRange 
Dim SpeakDirection As Object 
Dim SpeakFormulas As Object

instance.Speak(SpeakDirection, SpeakFormulas)
public void Speak(
    Object SpeakDirection,
    Object SpeakFormulas
)
public:
void Speak(
    Object^ SpeakDirection, 
    Object^ SpeakFormulas
)
public function Speak(
    SpeakDirection : Object, 
    SpeakFormulas : Object
)

Parameters

  • SpeakDirection
    Type: System.Object

    The speak direction, by rows or columns.

  • SpeakFormulas
    Type: System.Object

    true will cause formulas to be sent to the Text-To-Speech (TTS) engine for cells that have formulas. The value is sent if the cells do not have formulas; false (default) will cause values to always be sent to the TTS engine.

Remarks

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code sample demonstrates how to use the Speak method to speak the contents of a NamedRange control named NamedRange1 by columns.

This example is for a document-level customization.

Private Sub SpeakNamedRange()
    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("A1", "A5"), _
        "namedRange1")

    namedRange1.Value2 = 10
    namedRange1.Speak(Excel.XlSpeakDirection.xlSpeakByColumns, _
        False)
End Sub
private void SpeakNamedRange()
{
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["A1", "A5"],
        "namedRange1");

    namedRange1.Value2 = 10;
    namedRange1.Speak(Excel.XlSpeakDirection.xlSpeakByColumns,
        false);
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace