Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Joe Perfiry Joe Perfiry is offline
external usenet poster
 
Posts: 6
Default Mail Merge Macro for Printing

Hi I have a Sharp MX5500 printer and I do mail merge jobs of three pages to
about 8000 customers. I want each page to use a different tray as I have
letterhead in one, continuation in another etc If I select the printer and
choose different trays it will only print the very first job from these. The
rest will go to default. I want a macro that will enable this. Could someone
tell me one please?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail Merge Macro for Printing

Merge to a new document then the following macro will split the merge to
print as separate files

Sub SplitMergeLetterToPrinter()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to print each letter created by a
' mailmerge as a separate file.
'
Letters = ActiveDocument.Sections.Count
Counter = 1
While Counter Letters
ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _
From:="s" & Format(Counter), To:="s" & Format(Counter)
Counter = Counter + 1
Wend
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Joe Perfiry wrote:
Hi I have a Sharp MX5500 printer and I do mail merge jobs of three
pages to about 8000 customers. I want each page to use a different
tray as I have letterhead in one, continuation in another etc If I
select the printer and choose different trays it will only print the
very first job from these. The rest will go to default. I want a
macro that will enable this. Could someone tell me one please?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Joe Perfiry Joe Perfiry is offline
external usenet poster
 
Posts: 6
Default Mail Merge Macro for Printing

Thank-you very much indeed for your assistance, it works a treat.

"Graham Mayor" wrote:

Merge to a new document then the following macro will split the merge to
print as separate files

Sub SplitMergeLetterToPrinter()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to print each letter created by a
' mailmerge as a separate file.
'
Letters = ActiveDocument.Sections.Count
Counter = 1
While Counter Letters
ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _
From:="s" & Format(Counter), To:="s" & Format(Counter)
Counter = Counter + 1
Wend
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Joe Perfiry wrote:
Hi I have a Sharp MX5500 printer and I do mail merge jobs of three
pages to about 8000 customers. I want each page to use a different
tray as I have letterhead in one, continuation in another etc If I
select the printer and choose different trays it will only print the
very first job from these. The rest will go to default. I want a
macro that will enable this. Could someone tell me one please?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail Merge Macro for Printing

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Joe Perfiry wrote:
Thank-you very much indeed for your assistance, it works a treat.

"Graham Mayor" wrote:

Merge to a new document then the following macro will split the
merge to print as separate files

Sub SplitMergeLetterToPrinter()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to print each letter
created by a ' mailmerge as a separate file.
'
Letters = ActiveDocument.Sections.Count
Counter = 1
While Counter Letters
ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo,
_ From:="s" & Format(Counter), To:="s" & Format(Counter)
Counter = Counter + 1
Wend
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Joe Perfiry wrote:
Hi I have a Sharp MX5500 printer and I do mail merge jobs of three
pages to about 8000 customers. I want each page to use a different
tray as I have letterhead in one, continuation in another etc If I
select the printer and choose different trays it will only print the
very first job from these. The rest will go to default. I want a
macro that will enable this. Could someone tell me one please?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Curt Curt is offline
external usenet poster
 
Posts: 32
Default Mail Merge Macro for Printing

this counter idea for a first try at mail merge. Want word to stop searching
all of excel 6000 rows. 200 are more than enough. Takes to long to do all. I
recorder the following macro thru experminting it works except for the search
problem. Any help greatly appreciated
Thanks

Sub xy()

' xy Macro
' Macro recorded April 4, 2008 by Curtiss A. Greer
'
ActiveDocument.MailMerge.EditMainDocument
Selection.TypeParagraph
Selection.InsertDateTime DateTimeFormat:="MMMM d, yyyy", InsertAsField:= _
True, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.TypeParagraph
ActiveDocument.MailMerge.OpenDataSource Name:="C:\Parade\Parade.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:= _
"DSN=Excel
Files;DBQ=C:\Parade\Parade.xls;DriverId=790;MaxBuf ferSize=2048;PageTimeout=5;" _
, SQLStatement:="SELECT * FROM `Data$`", SQLStatement1:=""
' ActiveDocument.MailMerge.EditMainDocument
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Contact_Person"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Address"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"CityState"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:="Zip_"
Selection.TypeParagraph
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `Data$` WHERE ((`Contact Person` IS NOT NULL ) AND (`
Address` IS NOT NULL ) AND (`City&State` IS NOT NULL ) AND (`Zip ` IS NOT
NULL ) AND (`Amount` = 0))" _
& ""
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord tried 1 here
.LastRecord = wdDefaultLastRecord tried 50 here no luck
End With
.Execute Pause:=True
End With
CommandBars("Stop Recording").Visible = False
End Sub




"Graham Mayor" wrote:

Merge to a new document then the following macro will split the merge to
print as separate files

Sub SplitMergeLetterToPrinter()
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to print each letter created by a
' mailmerge as a separate file.
'
Letters = ActiveDocument.Sections.Count
Counter = 1
While Counter Letters
ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _
From:="s" & Format(Counter), To:="s" & Format(Counter)
Counter = Counter + 1
Wend
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Joe Perfiry wrote:
Hi I have a Sharp MX5500 printer and I do mail merge jobs of three
pages to about 8000 customers. I want each page to use a different
tray as I have letterhead in one, continuation in another etc If I
select the printer and choose different trays it will only print the
very first job from these. The rest will go to default. I want a
macro that will enable this. Could someone tell me one please?




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Macro Help Marcus Mailmerge 1 March 30th 07 06:27 PM
Creating a macro to run a merge and then printing , then save Bruce Mailmerge 1 December 17th 06 05:24 PM
Using macro, mail merge, access [email protected] Mailmerge 5 December 14th 05 01:20 PM
Mail Merge Macro Know your Word... Mailmerge 1 June 17th 05 10:43 AM
Mail merge and macro OliveX Mailmerge 0 May 18th 05 05:51 AM


All times are GMT +1. The time now is 04:23 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"