Macros and Programming


CardboxForumsMacros and Programming > "Mail Merge to Existing Document"

Mail Merge to Existing Document

Macro needed to open a mail merge using an existing document.

Posted By Post


4-Aug-2011 13:24


I am trying to make two macros.

The first is to send a mail merge to all of the current selection of records. I have this so far, which does not work

The CardboxCSV.txt is where I have exported to CSV format as mentioned in the help file.
The Orgnames 1,2,3 and 4 are potential contact names of people from the records. I would like these to show up, and then be able to delete the ones that are not applicable, as it is not know which contact we would like to write to.
The Salutation, Firstname, lastname fields are used for individual people, and the ORGNAMES 1,2,3 and 4 are used when the record is for an organisation, and these are potential contact names.

"WriteToFile cbxWriteFormatCSV+cbxWriteOptionFieldHeading+cbxWriteOptionAlwaysQuote, _
Set doc=GetObject("C:\Users\Gaddum Rochdale 2\Documents\Cardbox Mail Merge\LETTER TEMPLATE.doc","Word.Document")
Set mm=doc.MailMerge"

Secondly, I would like the option to perform this action for only the current record being viewed. I am assuming that adding:


To the top of the macro would do this?

© 2010 Cardbox Software Limited   Home