print multiple envelopes

N

news.epix.net

My objective is to print out n number of envelopes with a return address
only to keep on hand when paying bills.
I've created the following module below, however it invokes the printer
software 'printing' dialog n number of times. Ugly!

I would like to preset the number of copies in a variable in the
ActiveDocument.Envelope.PrintOut function, but I can't
find any options for number of copies.

Does anyone have a better way? I am not a Word programmer.


Thanks in advance,
M. Miller

Sub Envelopes()
'
Dim Message, Title, Default, MyValue
Message = "How many envelopes?" ' Set prompt.
Title = "Number of Envelopes" ' Set title.
Default = "1" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)

MsgBox (CStr(MyValue))

Dim i As Integer
For i = 1 To MyValue

ActiveDocument.Envelope.PrintOut ExtractAddress:=False,
OmitReturnAddress _
:=False, Height:=InchesToPoints(4.13), Width:=InchesToPoints(9.5), _
Address:="", AutoText:="ToolsCreateLabels1", ReturnAddress:= _
"Smothers Brothers", ReturnAutoText:="ToolsCreateLabels2", _
AddressFromLeft:=wdAutoPosition, AddressFromTop:=wdAutoPosition, _
ReturnAddressFromLeft:=wdAutoPosition, ReturnAddressFromTop:= _
wdAutoPosition, DefaultOrientation:=wdCenterClockwise,
DefaultFaceUp:= _
True, PrintEPostage:=False

Next i

End Sub
 
D

Doug Robbins - Word MVP

Use the Envelopes and Labels dialog to create the envelope, then click on
the add to document button, which will cause it to be added to the document
as Section 0 and then print out that Section of the document as many times
as you require by using the File>Print dialog and entering the number into
the Copies control.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
N

news.epix.net

Doug,

Thanks! I created a module that uses the inputbox() dialog and then set the
number of copies to the input and
assigned it a shortcut key. Simple and elegant.

Regards,
Marc Miller
 

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