I am trying to create a simple sub to create an envelope.

...
Set MyDoc = Wrd.activedocument

' Create new envelopes
strAddr = Me.FirstName & " " & Me.LastName & Chr(13) & Me.Address &
Chr(13) & Me.City & ", " & Me.RegionID.Column(1) & " " & Me.PostalCode
With MyDoc.Envelope
.Insert Address:=strAddr, Size:="Size 10"
End With
...

the code does insert an envelop as section 1 but also leave the original
blank doc as section 2. how can I simply get only the envelop without the
blank doc section2. I also tried recording a macro to delete section2 but
the the envelop revert to an 8.5x11....

Thank you for your help,

QB

Re: Creating an Envelop by Graham

Graham
Fri Feb 22 07:14:35 PST 2008

Wouldn't it be simper to create an envelope from a template? You can
download automated envelope template samples from my web site and replace
the code with your own if you wish.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Question Boy wrote:
> I am trying to create a simple sub to create an envelope.
>
> ...
> Set MyDoc = Wrd.activedocument
>
> ' Create new envelopes
> strAddr = Me.FirstName & " " & Me.LastName & Chr(13) &
> Me.Address & Chr(13) & Me.City & ", " & Me.RegionID.Column(1) & " " &
> Me.PostalCode With MyDoc.Envelope
> .Insert Address:=strAddr, Size:="Size 10"
> End With
> ...
>
> the code does insert an envelop as section 1 but also leave the
> original blank doc as section 2. how can I simply get only the
> envelop without the blank doc section2. I also tried recording a
> macro to delete section2 but the the envelop revert to an 8.5x11....
>
> Thank you for your help,
>
> QB