Dela via


Document.Creator Property (2007 System)

Gets the application in which the document was created.

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

Syntax

'Declaration
Public ReadOnly Property Creator As Integer
'Usage
Dim instance As Document 
Dim value As Integer 

value = instance.Creator
public int Creator { get; }
public:
property int Creator {
    int get ();
}
public function get Creator () : int

Property Value

Type: System.Int32
The application in which the document was created.

Remarks

If the specified object was created in Microsoft Office Word, this property returns the hexadecimal number 4D535744, which represents the string "MSWD." This value can also be represented by the constant wdCreatorCode.

Examples

The following code example displays a message that shows the name of the creator of the document.

This example is for a document-level customization.

Private Sub DocumentCreator()
    If Me.Creator = Word.WdConstants.wdCreatorCode Then
        MessageBox.Show("The Creator is Microsoft Office Word.")
    End If 
End Sub
private void DocumentCreator()
{
    if (this.Creator == (int)Word.WdConstants.wdCreatorCode)
    {
        MessageBox.Show("The Creator is Microsoft Office Word.");
    }
} 

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace