Geoff Convery
Registered User.
- Local time
- Today, 15:58
- Joined
- Jul 21, 2006
- Messages
- 33
I've an application which extracts to Excel then opens a mailmerge template to print documents using that information. I had it working for both Word 2000 and Word 2007 specifying different ways of opening Word depending on the version. I used Shell to open the 2000 version
Shell locWordProcessorPath & " " & locMailmergeDocPath, vbNormalFocus
where locWordProcessorPath and locMailmergeDocPath are the paths to Word 2000 and the mailmerge documents respectively
However I had to set Word as an object to open the 2007 version. using the following function
Sub OpenWordDoc(strDocPath As String)
Dim objApp As Object
Set objApp = CreateObject("Word.Application")
objApp.Visible = True
objApp.Documents.Open strDocPath
End Sub
The users have now presented me with a computer with 2003 installed and the default Shell method isn't working. I would set this computer up to use the 2007 method but the testing is a bit cumbersome. Can you suggest whether 2003 should work like 2007 or do I have to think again?
Shell locWordProcessorPath & " " & locMailmergeDocPath, vbNormalFocus
where locWordProcessorPath and locMailmergeDocPath are the paths to Word 2000 and the mailmerge documents respectively
However I had to set Word as an object to open the 2007 version. using the following function
Sub OpenWordDoc(strDocPath As String)
Dim objApp As Object
Set objApp = CreateObject("Word.Application")
objApp.Visible = True
objApp.Documents.Open strDocPath
End Sub
The users have now presented me with a computer with 2003 installed and the default Shell method isn't working. I would set this computer up to use the 2007 method but the testing is a bit cumbersome. Can you suggest whether 2003 should work like 2007 or do I have to think again?