Expand Minimize
This topic has not yet been rated - Rate this topic

DocumentBase.Name Property

Gets the name of the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
public string Name { get; }

Property Value

Type: String
The name of the document.

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

To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentName()
{
    MessageBox.Show(this.Name);
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.