Function MergeToWord()

'execute a mailmerge to generate a confirmation letter

    Dim objWord As Word.Application

    Dim ObjPath As String

    Set objWord = New Word.Application

    ObjPath = CurrentProject.Path & "\mail_merge.doc"

    With objWord

        .Visible = True

        .Documents.Open ObjPath

        DoEvents

        With objWord.ActiveDocument.mailmerge

            .Destination = wdSendToNewDocument

            .Execute

        End With

        .ActiveDocument.PrintPreview

        .Visible = True

    End With

    Set objWord = Nothing

End Function