Let me first tell that it’s the first time I’m doing this.
I’m developing a add-in in c# for excel where a user is suposed to open a file and then press a start button in the add-in to start the all process.
Now, what I want to know is how to get the name of the open file. I don’t know where the file is located, so I i can’t use FileInfo.
The file name is of this type “Cxxx_Curr_REC_surplus.xls”.
I’ve been trying, but all I get is the name of the active workbook.
I’d like to know if this is possible.
Try this:
Reference:
How to use Visual C# to automate a running instance of an Office program
MSDN