I am trying to use Windows Automation on my Access (2003 file format) app. I am using the Word.Application datatype. Is there a generic reference I can use that doesn’t need a specific version of Word?
Share
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 use late binding.
Instead of declaring something like:
use
This way you don’t need a reference in your VBA project, and versioning won’t be so much of a problem (aside from using version-specific functionality). There are a few drawbacks, like loss of intellisense when writing code, and not being able to use built-in constants from the application being automated, but it’s more robust when deploying to multiple clients.
See http://www.dicks-clicks.com/excel/olBinding.htm for more details on early vs. late binding (this covers Outlook but same principles apply to Word).