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)
Syntax
'Declaration
Public ReadOnly Property Name As String
'Usage
Dim instance As Document
Dim value As String
value = instance.Name
public string Name { get; }
public:
property String^ Name {
String^ get ();
}
public function get Name () : String
Property Value
Type: System.String
The name of the document.
Examples
The following code example displays a message that shows the name of the document.
This example is for a document-level customization.
Private Sub DocumentName()
MessageBox.Show(Me.Name)
End Sub
private void DocumentName()
{
MessageBox.Show(this.Name);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.