I have the following code in a module:
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\WINWORD.EXE C:\MyDir\MyWordDoc.doc /MMerge"
Call Shell(stAppName, 1)
If the user has Office XP, the path to the Office executables is changed, for example: C:\Program Files\Microsoft Office\Office10\WINWORD.EXE
Another post tells me I can use SysCmd(acSysCmdAccessDir) to return the path to the .exe. How do I use it in the above code to make my path less sensitive to the version of Office? I'm a VBA rookie, but can usually muddle through...
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\WINWORD.EXE C:\MyDir\MyWordDoc.doc /MMerge"
Call Shell(stAppName, 1)
If the user has Office XP, the path to the Office executables is changed, for example: C:\Program Files\Microsoft Office\Office10\WINWORD.EXE
Another post tells me I can use SysCmd(acSysCmdAccessDir) to return the path to the .exe. How do I use it in the above code to make my path less sensitive to the version of Office? I'm a VBA rookie, but can usually muddle through...