DocumentBase.SmartTags プロパティ
文書内のスマート タグを表す SmartTags オブジェクトを取得します。
名前空間: Microsoft.Office.Tools.Word
アセンブリ: Microsoft.Office.Tools.Word.v4.0.Utilities (Microsoft.Office.Tools.Word.v4.0.Utilities.dll 内)
構文
'宣言
Public ReadOnly Property SmartTags As SmartTags
Get
public SmartTags SmartTags { get; }
プロパティ値
型: Microsoft.Office.Interop.Word.SmartTags
文書内のスマート タグを表す SmartTags オブジェクト。
例
文書の最初のスマート タグにプロパティを追加するコード例を次に示します。 この例では、文書内にスマート コードが存在すると仮定しています。 この例を使用するには、これをドキュメント レベルのプロジェクトの ThisDocument クラスから実行します。
Private Sub DocumentSmartTags()
Dim index As Object = 1
If Me.SmartTags.Count >= 1 Then
Me.SmartTags.Item(index).Properties.Add("President", "true")
End If
End Sub
private void DocumentSmartTags()
{
object index = 1;
if (this.SmartTags.Count >= 1)
{
this.SmartTags.get_Item(ref index)
.Properties.Add("President", "true");
}
}
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。