B
Bill
I have built a mail-merge automation process in Access
2000 on Windows 98 with these References (among others):
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Word 8.0 Object Library
I've tested the process on Windows 2000 with the Word 9.0
OLB, and it works fine. However, my client also uses
Windows XP with the Word 10.0 Object Library, and the
automation fails. Is generic code available that will let
me run mail-merge automation in both 9.0 and 10.0? Here
are the relevant lines of existing code (line 3 is the
statement that fails now):
Dim objWord As Object
Set objWord = New Word.Application
objWord.Documents.Add <path and filename go here>
objWord.Visible = True
With objWord.ActiveDocument.Bookmarks
.Item("Field1").Range.Text = <data>
End With
Set objWord = Nothing
Thank you for your help!
-- Bill
2000 on Windows 98 with these References (among others):
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Word 8.0 Object Library
I've tested the process on Windows 2000 with the Word 9.0
OLB, and it works fine. However, my client also uses
Windows XP with the Word 10.0 Object Library, and the
automation fails. Is generic code available that will let
me run mail-merge automation in both 9.0 and 10.0? Here
are the relevant lines of existing code (line 3 is the
statement that fails now):
Dim objWord As Object
Set objWord = New Word.Application
objWord.Documents.Add <path and filename go here>
objWord.Visible = True
With objWord.ActiveDocument.Bookmarks
.Item("Field1").Range.Text = <data>
End With
Set objWord = Nothing
Thank you for your help!
-- Bill