[AccessD] Word mail merge code - Albert Kallal

cjlabs cjlabs at att.net
Mon Jan 30 11:39:46 CST 2017


I had been using Albert Kallal’s mail merge code for years (since 2003 or so), but it does not work in Office2010.   The last version I know that it was working was 2003.

 

I get an error from Word  “The document ‘merge.888’ caused a serious error the last time it was opened.  You may continue opening it or perform data recovery by clicking ‘Recover Data’. Clicking ‘Recover Data’ will extract text of your document but all formatting and pictures will be lost.”

 

Merge.888 is the data file for the merge.

 

 

If I choose Open, Word crashes.   I get an Automation error in procedure MergeWord of his WordCode sub.

 

 

If I chooseRecover Data, Word shows empty records (despite the data being in the file).

 

 

If I step through the procedure, it crashes on   WordDoc.MailMerge.OpenDataSource _

        Name:=strMergeDataFile, _

        ConfirmConversions:=False, _

        ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _

        PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _

        WritePasswordTemplate:="", Revert:=False, Format:=0, _

        Connection:="", SQLStatement:="", SQLStatement1:=""

 

Specifically when it calls the function  strMergeDataFile  which returns the path to the data file (in the Temp folder).

 

 

Is anyone using Kallal’s code and made the changes to work in more recent versions of Office?

 

I realize there are many ways to create a merge document in Word, but I would prefer to stick with what I am using if it will work.

 

I emailed Albert Kallal but received no response.

 

 

 

Thanks

Carolyn Johnson

St Louis, MO



More information about the AccessD mailing list