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