I am programming an excel add in, and I want to be able to determine the full path of the current excel file open. What would the command be to get this as a string?
Thank You!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all you need to somehow get a
Workbookexemplar. My example would be obvious, because I’ve already know where is my file, but if you gettingWorkbookpassed to you from somewhere you can use the same property.Now you can use
FullNameproperty to get name of file and all preceding path, or simply “Name” to get only filename:openedWorkbook.FullName