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

Macro Trouble 1

Status
Not open for further replies.

NSGuard

MIS
Jul 15, 2004
29
0
0
US
This should be quite easy for you guys, but I just don't understand the problem.

I am taking three fields from a table and mail merging them into a Word Template so that it automatically updates the document with the information in the database. That works fine, but my problem arises when I added a command button that is connected to a macro, that opens the Word Document. I have the correct path in the Command Line, but it gives me an error.

"Microsoft Access Can't Invoke the Application Using the RunApp Action: The path to the application is invalid, or a component of the application is missing."

I don't understand, and I would code it but, I am a novice coding at best and truthfully don't know where to begin.

Any help would greatly be appreciated. Thanks in advance.
 
Hi there -I've had a silmilar problem & the way round this was to use a hyperlink instead of a macro. There's no code required if your opening the same file every time and all you need to do is to look at the Properties of the command button & look for the hyperlink property & the rest is easy. Don't forget to delete your original code from the On click event.

Hope this helps.

Trystan
 
Thanks Trystan, That was very helpful. But an add-on question. How do I make the link to the Word Document coincide with the current record I am looking at. ie. I was looking at record number 14, but when I press the command button, it takes me to record number 1. Or is that not possible since it just linked?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top