How do I get the path to the current file in a common COM Office add-in?

I am wondering how I can get the path to the current file that is open in the sharing add-in for Microsoft Office. I am using Visual Studio 2010 with C #

I know this question is asked: "How to get a file in an Excel add-in?" but this does not answer my question.

+5
source share
1 answer

This is actually the right way to do this:

this.Application.ActiveDocument.Name

and

this.Application.ActiveDocument.Path

+1
source

All Articles