This documentation is archived and is not being maintained.

Document.Name Property (2007 System)

Gets the name of the document.

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

public string Name { get; }

Property Value

Type: System.String
The name of the document.

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

This example is for a document-level customization.

private void DocumentName()
{
    MessageBox.Show(this.Name);
}

Show: