S
Stuart
Hi,
I'm using the following code print out the name and
address onto an envelope, but I keep receiving run time
error 462 if the code is run more than once. It always
fails at the printout method. Also I would like to use
the Addressfromleft option, but I am unable to get it to
work. Can anyone help ?
With objWord
Set rng = objWord.ActiveDocument.Bookmarks("Name").Range
rng.End = objWord.ActiveDocument.Bookmarks
("Address").Range.End
.ActiveDocument.Bookmarks.Add _
Name:="EnvelopeAddress", _
Range:=rng
rng.Font.Size = 12
ActiveDocument.Envelope.PrintOut , , , , , , , , , , , , ,
AddressFromTop:=CentimetersToPoints(3.1)
End With
Thanks
I'm using the following code print out the name and
address onto an envelope, but I keep receiving run time
error 462 if the code is run more than once. It always
fails at the printout method. Also I would like to use
the Addressfromleft option, but I am unable to get it to
work. Can anyone help ?
With objWord
Set rng = objWord.ActiveDocument.Bookmarks("Name").Range
rng.End = objWord.ActiveDocument.Bookmarks
("Address").Range.End
.ActiveDocument.Bookmarks.Add _
Name:="EnvelopeAddress", _
Range:=rng
rng.Font.Size = 12
ActiveDocument.Envelope.PrintOut , , , , , , , , , , , , ,
AddressFromTop:=CentimetersToPoints(3.1)
End With
Thanks