VBA – Mail Merge Automation via Access

50 pts.
Tags:
MS Access
MS Word
VBA
Hi, I'm not sure why my code is not working.. I have code in vba in Access 03 which opens a word document which runs a mail merge process. When the code runs, it asks me what the Header Delimiters are.  I specified those in the export file as a comma for a field delimiter and <enter> as the record delimiter.  After I confirm this in word, I get a a run time error. The error I'm getting is: Run-time error '5922': Word was unable to open the data source. strExportFullyQualifiedName is a text file which is exported with the field names listed in there which is being used as a data source file.  I checked the links and verify, everything exists.  The connection is not being made. strExportFullyQualifiedName is the location of the txt file.    
    With objWordDoc
            .MailMerge.OpenDataSource _
              Name:=strExportFullyQualifiedName, Format:=wdOpenFormatAuto, _
              ConfirmConversions:=False, ReadOnly:=False, SubType:=wdMergeSubTypeAccess, AddToRecentFiles:=False
            .MailMerge.Destination = wdSendToNewDocument
            .MailMerge.MainDocumentType = wdDirectory
            .MailMerge.SuppressBlankLines = True
        End With
Thanks !

Software/Hardware used:
VBA

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following