View Single Post
 
Old 03-29-2018, 03:07 PM
amenu amenu is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Mar 2018
Posts: 6
amenu is on a distinguished road
Default

Hi Paul,

Quote:
Originally Posted by macropod View Post
It also seems clear to me that you're not actually starting off with an empty document - it already has the empty labels in place.
You are right. I did start off with a preformatted table.

Since my previous reply I have recorded a macro that seems to work. It opens the Word document ("MAILING.docx") that contains my latest preformatted table, asks for a Yes, and when Yes is clicked, creates the labels ready for printing. The disadvantages of using a macro are as you say, although reducing the process to one click is more likely to induce acceptance by the person I am hoping to help.

Here's the code:

Code:
Sub Macro4()
'
' Macro4 Macro
'
'
    ChangeFileOpenDirectory _
        "E:\Data backup 24 Nov 2017\DATA\Centennial Treasurer\"
    Documents.Open FileName:="MAILING.docx", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
    With ActiveDocument.MailMerge
        .Destination = wdSendToNewDocument
        .SuppressBlankLines = True
        With .DataSource
            .FirstRecord = wdDefaultFirstRecord
            .LastRecord = wdDefaultLastRecord
        End With
        .Execute Pause:=False
    End With
End Sub

Last edited by macropod; 03-29-2018 at 03:08 PM. Reason: Added code tags
Reply With Quote