Is it possible to open all types of files from excel vba with just the file path? Right now I can open workbooks with the simple:
Workbooks.Open myDestFilePath
but what if myDestFilePath is really a .pptx file or whatever else?
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.
You can absolutely use Excel VBA to automate other apps, but you need to use the correct application object for the task. If you’re trying to open PowerPoint files, you will need to use PowerPoint to do it. Here’s a crude example:
So if your question is “Can I use Excel to open files created by other apps”, the short answer is no. However, if the question is “Can I use Excel VBA to automate other applications to perform operations on non-Excel files?” the answer is yes.