Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with VBA Mail Merge
I bet you'd get more answers in an MSWord newsgroup.
Claude wrote: Hi, Could someone please tell me if it is possible to include a mail merge field in the "Address:=" part of this code located at the bottom? I guess what I'm trying to do is include my own text & mail merge field in the label? I was hoping the the following could somehow be inserted? ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _ "Distribution" ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels ActiveDocument.MailMerge.OpenDataSource Name:= _ "S:\mag-hr\Payroll\Payroll@Magill\Reporting\Group Distribution List Weekly.xls" _ , ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _ AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _ WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _ Format:=wdOpenFormatAuto, Connection:="Entire Spreadsheet", SQLStatement _ :="", SQLStatement1:="" Application.MailingLabel.DefaultPrintBarCode = False Application.MailingLabel.CreateNewDocument Name:="L7163", *Address:= _ "Weekly Payslips - Private & Confidential" & Chr(13) & Chr(13) _ & Chr(13) & "Weekly Payslips - Private & Confidential" & Chr(13), _* AutoText:="", LaserTray:=wdPrinterManualFeed Not having much luck! Thanks Claude -- Claude ------------------------------------------------------------------------ Claude's Profile: http://www.excelforum.com/member.php...o&userid=27992 View this thread: http://www.excelforum.com/showthread...hreadid=474979 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
merge two excel files like in word mail merge | Excel Discussion (Misc queries) | |||
Zip codes in mail merge - first digit doesn't display in merge | Excel Discussion (Misc queries) | |||
Code launches Mail Merge but disables the Mail Merge | Excel Discussion (Misc queries) | |||
mail merge excludes my headers and critical data in Word merge | Excel Discussion (Misc queries) | |||
how do i get my mail merge to update the data source at each merge | Excel Discussion (Misc queries) |