RichTextContentControl.SetPlaceholderText Method (2007 System)

Displays text that is in a BuildingBlock, a Range, or a string as the placeholder text in the RichTextContentControl.

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

Syntax

'Declaration
Public Sub SetPlaceholderText ( _
    BuildingBlock As BuildingBlock, _
    Range As Range, _
    Text As String _
)
'Usage
Dim instance As RichTextContentControl 
Dim BuildingBlock As BuildingBlock 
Dim Range As Range 
Dim Text As String

instance.SetPlaceholderText(BuildingBlock, _
    Range, Text)
public void SetPlaceholderText(
    BuildingBlock BuildingBlock,
    Range Range,
    string Text
)
public:
void SetPlaceholderText(
    BuildingBlock^ BuildingBlock, 
    Range^ Range, 
    String^ Text
)
public function SetPlaceholderText(
    BuildingBlock : BuildingBlock, 
    Range : Range, 
    Text : String
)

Parameters

  • BuildingBlock
    Type: BuildingBlock

    A BuildingBlock that contains the placeholder text.

  • Range
    Type: Range

    A Range that contains the placeholder text.

Remarks

The placeholder text is displayed until a user edits the control, the control is populated with data from a data source, or the control's contents are deleted.

Only one of the parameters is used when you call the SetPlaceholderText method. If more than one parameter is specified, Microsoft Office Word uses the first specified parameter. If all parameters are omitted, the placeholder text is an empty string.

To get the placeholder text of a RichTextContentControl, use the PlaceholderText property. You can also use this property to set the placeholder text to a string.

.NET Framework Security

See Also

Reference

RichTextContentControl Class

RichTextContentControl Members

Microsoft.Office.Tools.Word Namespace