Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-15-2016, 09:11 AM
LoftySuth LoftySuth is offline MailMerge with several repetitions of a single record Windows 7 32bit MailMerge with several repetitions of a single record Office 2007
Novice
MailMerge with several repetitions of a single record
 
Join Date: Aug 2016
Posts: 4
LoftySuth is on a distinguished road
Default

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
I have not been able to find any references about repeating a label, nor is it obvious where it would go in the code above.
Can you point me in the direction I should take to progress further?
Lofty
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
MailMerge with several repetitions of a single record Record Matching Excel Excel 13 08-21-2014 09:44 PM
MailMerge with several repetitions of a single record Mailmerge to Email with a mailmerge attachment Baldeagle Mail Merge 8 02-11-2013 04:40 AM
MailMerge with several repetitions of a single record Mailmerge to Email with a mailmerge attachment 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft