Adding a reference to ADO library to Word project

R

Rick Charnes

I've done some investigations about using ADO to bring information from
SQL into a Word macro. I have some code but I think the piece I'm
missing is how add a reference to the Microsoft ActiveX Data Object
Library to my Word VBA project. Can someone suggest how I do this?
Thanks very much.
 
P

Peter Jamieson

In the VBA Editor, with the relevant module open, use Tools|References. Look
down the list for Microsoft ActiveX Objects 2.n Library (you may see several
different versions). Check the version you want to use, e.g. 2.8. Click OK.

If your code is going to be distributed to other platforms, you need to
choose your version carefully (and I can't really help you there) but during
the learning phase it probably doesn't matter all that much which one you
select.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top