XMLNodes.Creator 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取在其中创建 XMLNodes 控件的应用程序。
public int Creator { get; }
属性值
在其中创建 XMLNodes 控件的应用程序。
示例
下面的代码示例使用 Count 属性来显示 XMLNodes 控件是否是在 Microsoft Office Word 中创建的。 此示例假设当前文档包含一个 XMLNodes 名为的控件 InsertMemoToNodes 。
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.");
}
}
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
注解
由于 XMLNodes 集合是在 Microsoft Office Word 中创建的,因此该属性返回十六进制数4D535744,它表示字符串 "MSWD"。 此值还可以由常数表示 wdCreatorCode 。