Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling MSWord through MSAccess

Status
Not open for further replies.

monkeyman01

Programmer
Aug 4, 2005
2
US
Right now I can open a word Template using code in MSAccess but I want to save the word file using MSAccess. The reason I want to name the file is access is becuase I want to store the file name in a table that is linked to another table.
 
Hi!

I assume you are using a Word object to open the template in Access. If so the Word object will have a SaveAs method where you can give the document any path and name you want.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Actually I am using a shellexecute function to open the word application. Everything I have looked up does not mention using that same function to save a file. If it does what is the code?
 
Have a look at OLE automation (CreateObject or GetObject functions).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Are you sure you don't want to use Mailmerge instead of a Word template? Either way, my code is a decent example of how to do OLE automation (uses late binding, etc.):

'Native' mailmerge reports - as painless as possible faq181-5088
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top