DocumentBase.FullName 屬性

取得文件的名稱,包括磁碟或 Web 路徑。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

'宣告
Public ReadOnly Property FullName As String
    Get
public string FullName { get; }

屬性值

型別:System.String
文件的名稱,包括磁碟或 Web 路徑。

備註

使用此屬性,就如同使用序列中的 PathPathSeparatorName 屬性一樣。

範例

下列程式碼範例會顯示訊息,說明文件的路徑和名稱。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

Private Sub DocumentFullName()
    MessageBox.Show(Me.FullName.ToString())
End Sub
private void DocumentFullName()
{
    MessageBox.Show(this.FullName.ToString());
}

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間