How to get Word document file name from C #?

I am working on MS Word AddIn (VSTO). The idea is that I am working on a Word document and posting it somewhere.

I have all the code I need, except for one: is there a way to get the file name of the Word document I'm working on? (if it is already saved)

+6
c # ms-word vsto
source share
1 answer

this.FullName property in the .cs file for code should provide you with the whole path to the current document.

Here is the exact request in my QuickWatch window.

((Microsoft.Office.Tools.Word.Document)(this)).FullName 
+9
source share

All Articles