Office Header and Footer

M

Mike

I am trying to add text to the Header and Footer of Word, PowerPoint, and
Excel and maintain any existing data that is already there. I have been
successful in doing this except I lose any formatting of the existing data,
i.e Right or Left justified text comes out as Center justified after placing
my text. How can I maintain the existing data and formatting and place my
text? I have used the Range and Selection and saved the Range.Formatted text
and replaced it after I put in my text (center justified) and it still comes
out using my text justification and not what the text was originally
formatted for. Any help with this would be appreciated greatly as I have
been working on this for severl weeks. Thanks.
 
C

Cindy M.

Hi Mike,
I am trying to add text to the Header and Footer of Word, PowerPoint, and
Excel and maintain any existing data that is already there. I have been
successful in doing this except I lose any formatting of the existing data,
i.e Right or Left justified text comes out as Center justified after placing
my text. How can I maintain the existing data and formatting and place my
text? I have used the Range and Selection and saved the Range.Formatted text
and replaced it after I put in my text (center justified) and it still comes
out using my text justification and not what the text was originally
formatted for. Any help with this would be appreciated greatly as I have
been working on this for severl weeks.
The approach is certainly going to be quite different foreach of the three
applications. Your best bet is to ask a separate question separately in
newsgroups specific to the three applications.

Speaking only for Word, you first have to work out how the different "parts" of
the header and footer will be separated. The h/f in Word are just like paragraph
text, so if you set an ALIGNMENT, it will affect ALL the text in a paragraph.
The two standard approaches for aligning text left/center/right are
1. Use tab stops between the "parts". The first tabstop is of type "center"; the
second of type "right-align". This means a TAB character (ANSI 09 / vbTAB) must
be between the text for each "part".

2. Place a three-column table in the header, with the second column formatted as
"centered" and the third as "right-align".

(2) is probably easier to work with, but can cause problems if you're using
graphics or page numbering. You'll want to test the two approaches in a
document, as a "normal user", to determine which meet your requirements.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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