Switching to Word from Access: path to winword.exe

  • Thread starter Thread starter Kathy Webster
  • Start date Start date
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
 
Kathy,

Not sure if it will work, but... have you tried just putting
"winword.exe" without the path specified.
 
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
 
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?
 
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.
 
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.
 
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?
 
Kathy,

Regrettably, I think the question might be:
"Anybody there who has anything further of substance to contribute?"
 
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?
 
Back
Top