Thread: [Solved] Can't merge mail from Excel
View Single Post
 
Old 04-06-2014, 03:32 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Unless you use three different 'RunMerge' macros (e.g. RunMerge_Letter, RunMerge_Label, RunMerge_Envelope) you would need whatever code you use to choose the merge type to change these two lines:
Set wddoc = .Documents.Open(ThisWorkbook.Path & "\Mail Merge Main Document.docx")
and:
.MainDocumentType = wdFormLetters

The first line tells the macro which document to use (each merge requires a different document) and the second line tells the macro what kind of merge to do with that document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote