I am wondering how I can get the path to the current file that is open in a Shared COM Add-in for Microsoft Office. I am using Visual Studio 2010 with C#
I know this question has been asked, “How do I get the file in an Excel add-in?” but that does not answer my question.
Actually this is the correct way to do it:
this.Application.ActiveDocument.Nameand
this.Application.ActiveDocument.Path