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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi All, This is a repost of a me

Status
Not open for further replies.

timnicholls

Technical User
Oct 31, 2003
43
0
0
AU
Hi All,

This is a repost of a message from November. I have been working on this for a while and need further input.

I have a merge for an individual document going out to Word.

All is working well.

I am having trouble saving the documents path automatically and updating a subform field (with the path) with each new document for each seperate client.

I do not know how to update the recordset for a new record and place the path
in the proper place. I have it set up to do it manually, you can press the "+" button to
open a dialog and find the document after you have saved it to a common file,
but I would like to automatically save the document and the path at the same time.
(When the document closes)

The coding I have so far is not all mine, but it works.

I think I should be using Application.ActiveDocument.Close to do something after Word closes then Application.ActiveDocument.FullName to get the path of where the document was saved...

A demo database can be dowloaded from me here:

All the important code is behind the cmdWord Button I think.

Can I ask a couple of people to have a look?
A couple of demo Word templates are also included so everything works as it should (so far anyway)

Thanks
Tim
 
You may be better off letting Access control the location of saving the docs. In other words pick the client and folder location in Access and pass that to MS Word instead of trying to get the filename from MS Word.

So when the Word doc is created from the template it is already saved in the correct place and just needs to be resaved when information is added to it.

DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top