![]() |
#3
|
|||
|
|||
![]()
gmayor,
Thanks for your interest. Rather than a packaged answer to my question I was hoping for some help with the coding I thought would be needed. I am used to using VBA with excel but never before with word. I have got the following code (By recording a macro) Code:
Sub Merge() ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels ActiveDocument.MailMerge.OpenDataSource Name:= _ "U:\EVERYBODY!\Antalis\Antalis_BarCodes.xlsx", ConfirmConversions:=False, _ ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _ PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _ WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _ Connection:= _ "Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=U:\EVERYBODY!\Antalis\Antalis_BarCodes.xlsx;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Engine Type=37;Jet OLEDB:Database Loc" _ , SQLStatement:="SELECT * FROM `BARCODES$`", SQLStatement1:="", SubType:= _ wdMergeSubTypeAccess Selection.TypeText Text:=" " Selection.TypeParagraph Selection.Font.Name = "EAN-13" Selection.Font.Size = 72 Selection.TypeText Text:=" " Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _ "BASE_EAN_CODE" With ActiveDocument.MailMerge .Destination = wdSendToNewDocument .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With End Sub Can you point me in the direction I should take to progress further? Lofty |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Excel | Excel | 13 | 08-21-2014 09:44 PM |
![]() |
Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
![]() |
Baldeagle | Mail Merge | 13 | 05-29-2012 02:04 PM |
avoid duplicete record and merge the record with the existed record | hemant.behere | Excel | 0 | 01-10-2012 02:53 AM |
How to segregate a single record into separated cells | KIM SOLIS | Excel | 3 | 09-09-2011 02:54 AM |