I want more than 1 copy when the macro send to printer

G

Guest

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.
 
D

Doug Robbins

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/MergeStraightToPrintrWVBA.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top