Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merge two excel files like in word mail merge azmerritt Excel Discussion (Misc queries) 1 December 11th 16 09:23 PM
Zip codes in mail merge - first digit doesn't display in merge Cheryl Excel Discussion (Misc queries) 1 December 22nd 09 08:13 PM
Code launches Mail Merge but disables the Mail Merge austris Excel Discussion (Misc queries) 0 October 14th 06 01:11 AM
mail merge excludes my headers and critical data in Word merge Nix Excel Discussion (Misc queries) 0 April 21st 06 08:35 PM
how do i get my mail merge to update the data source at each merge Steel_Monkey Excel Discussion (Misc queries) 0 November 30th 05 08:41 AM


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"