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?

Re: Starting Access from within Word by Doug

Doug
Sun Oct 12 20:35:16 CDT 2003

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
"Pete Savan" <drsavan@aol.com> wrote in message
news:035201c390ce$b78d2850$a001280a@phx.gbl...
> 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?



Starting Access from within Word by Pete

Pete
Tue Oct 14 06:21:58 CDT 2003

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!