I am a new user to the Windows 7 version. I am experience problems with word automation that did not occur in window XP. Does anyone know why my code in access 2007 to automate the mail merge to create word documents requires the user to open a blank word document first in order for the code to work? The code listed below worked fine prior to switching to windows 7 without having to open word first. Any suggestions would be greatly appreciated.

Dim objWord As Word.Document
Set objWord = GetObject("P:\MailMerge\Health5.doc", "Word.Document")
' Make Word visible.


objWord.Application.Visible = True
' Set the mail merge data source as the Northwind database.
objWord.MailMerge.OpenDataSource _
Name:="P:\oshaconsultation.accdb", _
LinkToSource:=True, _
Connection:="TABLE MergeTable", _
SQLStatement:="SELECT * FROM [MergeTable]"
' Execute the mail merge.
objWord.MailMerge.Execute
objWord.Close
Set objWord = GetObject("P:\MailMerge\ROC5.doc", "Word.Document")
' Make Word visible.
objWord.Application.Visible = True
' Set the mail merge data source as the Northwind database.
objWord.MailMerge.OpenDataSource _
Name:="P:\oshaconsultation.accdb", _
LinkToSource:=True, _
Connection:="TABLE MergeTable", _
SQLStatement:="SELECT * FROM [MergeTable]"
' Execute the mail merge.
objWord.MailMerge.Execute
objWord.Close
End Function