Hi =?Utf-8?B?c21IYWln?=,
I need to put in two lines on the left side of the header, and the current
date on the right side. Currently, text appears in these places to indicate
where the headers need to be placed. There are not like the formfields that
I am filling in on the body of the template. There I can reference the form
field name and place a value into it with code. But I am not sure how to do
this with the header given the fact that it is two lines on the left and the
date on the right.
I see that the code you gave me would work for the first line and I suppose
I can introduce blanks and then put in the date at the right side, but not
sure about placing text on a second header line. Also there may be an easier
way to put the date on the right without using the crude method I suggested
above.
As I see it, you'd have two basic choices.
1. Analagous to the form field approach: Insert three bookmarks. (Select the
placeholder text you currently have, one item at a time, then Insert/Bookmark).
Assign the content: doc.Bookmarks("Name").Range.Text = "the text"
2. As I suggested in my previous reply, but positioning the three items:
Set rng = doc.Headers(wdHeaderFooterPrimary).Range
rng.Text = "First item" & vbTAB & "Second item" & vbCR & "third item"
vbTAB inserts a Chr$(9); vbCR a Chr$(13). In the template, delete all text you
currently have. Select the remaining paragraph mark and assign a right-aligned
tab stop to the right margin. The second item will then automatically position
at that tab-stop.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)