I am trying to merge data entered on a form with an existing word doc and am running into trouble. My code is:

Function MergeIt()
Dim HoldNotice2 As Word.Document
Set HoldNotice2 = GetObject("C:\Documents and Settings\kfergus\Desktop\HoldNotice2merge.doc", "Word.Document")

HoldNotice2.Application.Visible = True
HoldNotice2.MailMerge.OpenDataSource _
Name:="C:\Documents and Settings\kfergus\desktop\hold.mdb ", _
LinkToSource:=True, _
Connection:="TABLE Holdtbl", _
SQLStatement:="SELECT * FROM [Holdtbl]"

HoldNotice2.MailMerge.Destination = wdSendToNewDocument
HoldNotice2.MailMerge.Execute
HoldNotice2.Application.Options.PrintBackground = False
HoldNotice2.Application.ActiveDocument.PrintOut

HoldNotice2.Close

End Function

1/2 the time it works and the other 1/2 I get error messages about the db being unable to open or to be locked. When I debug it's always the same lines that I'm having trouble with, Set HoldNotice2... and HoldNotice2.MailMerge.OpenDataSource ... I verified the location and it's correct.

Help, please!


:cry: