Switching to Word from Access: path to winword.exe

K

Kathy Webster

I have a macro that switches from Access to Word and executes a Word macro.
The problem is the path to winword.exe.
My access macro action is RunApp, with the
Command Line: "c:\program files\yada yada\winword.exe" /mMergeTheData

I run this on different machines, and different machines have different
paths to winword.exe.
I don't want to change my access command line for each machine.
How can I write a generic command line that will find winword.exe regardless
of its location?

TIA,
Kathy
 
S

Steve Schapel

Kathy,

Not sure if it will work, but... have you tried just putting
"winword.exe" without the path specified.
 
B

bob

If you are willing to work in code, this works:

Function OpenWordDocGen(strDocName As String)
Dim ObjApp As Object
'opens the doc
Set ObjApp = CreateObject("Word.application")
ObjApp.Visible = True
ObjApp.Documents.Open strDocName
End Function

Bob
 
K

Kathy Webster

I'm willing, but I'm not trying to open a doc in word, I'm trying to execute
a macro in word.
How would I do that in code?
 
K

Kathy Webster

Yes. It seems to work on some computers, but not all, so there must be
something else going on that I am unaware of w/each computer's setup.
 
K

Kathy Webster

Anybody there? :-|
Kathy

Kathy Webster said:
Yes. It seems to work on some computers, but not all, so there must be
something else going on that I am unaware of w/each computer's setup.
 
K

Kathy Webster

Anybody there? :-|
Kathy

Kathy Webster said:
I'm willing, but I'm not trying to open a doc in word, I'm trying to
execute a macro in word.
How would I do that in code?
 
S

Steve Schapel

Kathy,

Regrettably, I think the question might be:
"Anybody there who has anything further of substance to contribute?"
 
K

Kathy Webster

Can anyone help?
Thanks,
Kathy

Kathy Webster said:
I'm willing, but I'm not trying to open a doc in word, I'm trying to
execute a macro in word.
How would I do that in code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top