XMLNodes.Creator 屬性
取得建立 XMLNodes 控制項的應用程式。
命名空間: Microsoft.Office.Tools.Word
組件: Microsoft.Office.Tools.Word (在 Microsoft.Office.Tools.Word.dll 中)
語法
'宣告
ReadOnly Property Creator As Integer
Get
int Creator { get; }
屬性值
型別:System.Int32
建立 XMLNodes 控制項的應用程式。
備註
因為 XMLNodes 集合是建立在 Microsoft Office Word 中,所以這個屬性會傳回十六進位數字 4D535744,這代表字串 "MSWD"。這個值也可以用常數 wdCreatorCode 來表示。
範例
下列程式碼範例使用 Count 屬性,顯示 XMLNodes 控制項是否建立在 Microsoft Office Word 中。 此範例假設目前的文件包含名為 InsertMemoToNodes 的 XMLNodes 控制項。
Private Sub DisplayCreator()
If Me.InsertMemoToNodes.Creator = _
Word.WdConstants.wdCreatorCode Then
MsgBox("InsertMemoToNodes was created " & _
"in Microsoft Office Word.")
Else
MsgBox("InsertMemoToNodes was not created " & _
" in Microsoft Office Word.")
End If
End Sub
private void DisplayCreator()
{
if (this.InsertMemoToNodes.Creator ==
(int)Word.WdConstants.wdCreatorCode)
{
MessageBox.Show("InsertMemoToNodes was created " +
"in Microsoft Office Word.");
}
else
{
MessageBox.Show("InsertMemoToNodes was not created " +
" in Microsoft Office Word.");
}
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。