Share via


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 安全性

請參閱

參考

XMLNodes 介面

Microsoft.Office.Tools.Word 命名空間