Home |
Search |
Today's Posts |
#1
|
|||
|
|||
I want more than 1 copy when the macro send to printer
I have written a macro that do a mailmerge, my problem is that i want the
user to choose how many copies to print. I have the number of copies in a variable. "numcopies = system.privateprofilestring(inifil, "startup", "numcopies") " How can i put in ".copies:=numcopies" in my codeexample below? Or are there any better/other solution? " With ActiveDocument.MailMerge .Destination = wdSendToPrinter .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With " Thanks in advance. |
#2
|
|||
|
|||
Have your macro execute the merge to a new document and then print out that
document using the .PrintOut command which will allow you to vary the number of copies that are printed. You will also avoid the File Print dialog from showing. See the article "How to do a mail merge to the printer using VBA, without displaying the Print dialog" at: http://word.mvps.org/FAQs/MailMerge/...PrintrWVBA.htm -- Please respond to the Newsgroup for the benefit of others who may be interested. Questions sent directly to me will only be answered on a paid consulting basis. Hope this helps, Doug Robbins - Word MVP "BcKarl" wrote in message ... I have written a macro that do a mailmerge, my problem is that i want the user to choose how many copies to print. I have the number of copies in a variable. "numcopies = system.privateprofilestring(inifil, "startup", "numcopies") " How can i put in ".copies:=numcopies" in my codeexample below? Or are there any better/other solution? " With ActiveDocument.MailMerge .Destination = wdSendToPrinter .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=False End With " Thanks in advance. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
faxing from word 2003 mail merge | Mailmerge | |||
How do I update Word 2002 to create merged faxes? | Mailmerge | |||
How do I send printer ESC codes from a Word document | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge | |||
How do I remove the send a copy to tools on the toolbar in MS wor. | Microsoft Word Help |