Access/Word

  • Thread starter Thread starter Mike375
  • Start date Start date
M

Mike375

Guest
I have Access open a Word.doc and fill bookmarks etc and then the letter is edited.

In a Word macro I have Application.Quit True whick works just fine.

However, is there something that I can put in that Word macro so it will run a function or a macro on the Access form from which the Word.doc was opened. The Access form would still be open. The Access macro to be run is a RunCode action.
 
You could add automation code to your Word macro that performs code in the Access database. In Access help, you will find information on automating Access. If you tell us what you want to do, we may be able to provide more speciic advice.
 
Code on an Access label opens a Word.doc with both bookmarks and two linked queries. It then copies the contents and closes that Word.doc without saving. Saving would cause problems because of the bookmark entries and the formatting of the linked queries.

The same code continues and opens the letter referred to in my post and pastes the contents of the first letter into this letter. It does not matter if this letter is saved since it just gets a copy of what is in the "real letter". This copy/letter then has editing done to it. Once completed this letter is closed with the button/word macro on the letter. That re exposes the Access form and a label is clicked which reopens the letter, prints it, copies it, closes it and then opens a new record in a Many table/form and pastes the Word document contents into a memo field. It is this last part that I would like to accomplish with the closing of the Word.doc.
 

Users who are viewing this thread

Back
Top Bottom