Thanks for your advice, Shauna. I will look over all of this very carefully as I play with this whole letterhead dilemma again. Not
every letter "wants" the letterhead applied to it. That is determined my a user decision that is indicated by checking a checkbox on
the userform. I thought I had gone over this whole auto-text subject before, but I did not know about the paragraph marker thing. I
do know that I was getting all kinds of problems. Everything from having my real headers and footers messed up by the letterhead to
having the letterhead show up again if there was a 3rd page and so on. I know that sounds like somebody told it to do an odd pages
only setting, but I don't think that happened. I just know that by having the letterhead in the same file as the template I was
using to generate the letters, things went badly. I guess the file itself has styles and settings which the letters it generates
inherit, but I am also giving lots of specific instructions regarding headers and footers, margins, fonts, you name it, via code. I
hope I get all of this sorted out quickly.
Thanks again !
Richard
--
RMC,CPA
Hi Richard
Some comments that might help. Here I've used the word "letterhead" to mean
the combination of images and/or text that you want to appear on the first
page of a letter.
1. When you create an AutoText, if you include the end-of-paragraph marker
in the AutoText, then Word will respect all the styles or direct formatting
you have applied to the content you're saving as an AutoText. That would be
appropriate for the letterhead. And, when you insert such an AutoText, set
the RichText argument to True.
2. When you create an AutoText, if you don't include the end-of-paragraph
marker, Word stores only the text. That is appropriate for inserting
unformatted text into the middle of your document--perhaps into the middle
of a paragraph. The text will taken on the style and direct formatting of
the text around it. Generally, you set RichText to False in this case.
3. The source of your letterhead (ie whether typed by hand, or copied and
pasted, or generated by doing File > New and choosing a template that has
the letterhead in its header) is completely unrelated to whether or not that
letterhead appears in the header of the first or odd or even pages. That
depends on the properties of the first Section in the document. You'll need
to set the Section properties so that .DifferentFirstPageHeaderFooter is
true. VBA Help provides examples.
For more information on what to do, see
Working with sections
http://www.word.mvps.org/FAQs/Formatting/WorkWithSections.htm
and
Setting up letter templates
http://sbarnhill.mvps.org/WordFAQs/Letterhead.htm
For how to find out what objects and properties to use see
http://word.mvps.org/FAQs/MacrosVBA/ModifyRecordedMacro.htm
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word