Thread: [Solved] Mail Merge Printing
View Single Post
 
Old 02-03-2017, 01:49 AM
Danholland Danholland is offline Windows 10 Office 2013
Novice
 
Join Date: Jan 2017
Posts: 2
Danholland is on a distinguished road
Default

will this need changing at all, im not very good at understanding macros


Quote:
Originally Posted by gmayor View Post
If your data source is Excel, you could use http://www.gmayor.com/ManyToOne.htm in One to One mode and merge to the printer, each document is treated as a separate print job.

If not you could use the following macro. Merge to a new document and use the macro to split the document to the printer.
Code:
Sub SplitMergeLetterToPrinter()
Dim lng_Sections As Long
Dim lng_Counter As Long

    lng_Sections = ActiveDocument.Sections.Count
    lng_Counter = 1
    While lng_Counter < lng_Sections
        ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _
                                From:="s" & Format(lng_Counter), to:="s" & Format(lng_Counter)
        lng_Counter = lng_Counter + 1
    Wend
lbl_Exit:
    Exit Sub
End Sub
Reply With Quote