Section formatting

J

Julie

Hi;

I am using a letterhead template. I have a macro that
goes to the end of the letter, creates a next page section
break, and then formats that page as an envelope. Works
great.

Now, when I delete the envelope page, of course the letter
takes on the envelope formatting. So, I added another
section break at the end, so the Section 1 formatting
would be stored in this section break, so I could delete
the other section break, and the envelope formatting along
with it. It looks like it works, but then when you create
a new page for your letter, it takes on the envelope
formatting.

How can I get rid of section 2 formatting? Deleting the
pages within that section or deleting the section break
does not work. Help! Thank you.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Why not use the example given in the help file that adds the envelope to the
front of the document. Then you will avoid the problems that you now have.

Dim myDoc as Document, addr as String, retaddr as String
Set myDoc = ActiveDocument
addr = "Michael Matey" & vbCr & "123 Skye St." _
& vbCr & "Redmond, WA 98107"
retaddr = "Cora Edmonds" & vbCr & "456 Erde Lane" & vbCr _
& "Redmond, WA 98107"
With myDoc.Envelope
.Insert Address:=addr, ReturnAddress:=retaddr
.AddressFromTop = InchesToPoints(2.25)
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
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