Starting Access from within Word

P

Pete Savan

I want to make a macro that will open an MS Access
database from within MS Word. I managed to do this when I
was using Office 97 but I've forgotten the code that I
used and now that I'm using Office 2000, things seem a lot
different. Any ideas?
 
D

Doug Robbins - Word MVP

Hi Pete,

See the article "Access a database and insert into a Word document the data
that you find there" at:

http://www.mvps.org/word/FAQs/InterDev/GetDataFromDB.htm

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
P

Pete Savan

I've found the solution myself because I have just come
across the Office 97 code that I thought I had lost. I
include it here in case it's of use to anyone else:

'This code assumes that the database file is in the root
of Drive-C and is called "customers.mdb"

ReturnValue = Shell("c:\program files\microsoft
office\office\msaccess.exe c:\customers.mdb", 3)
AppActivate ReturnValue

This will load MS Access and then open the database file
called customers.mdb. Works a treat!
 

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

Top