Rather than creating a macro to do this, the normal thing would be to create
a template that has the header set up in it. Being a letter, you would set
the template up with a different first page header that the one that you
macro is now creating would be the primary header so that the first time
that it would appear would be on page 2 of the document.
To get the saluation to appear in the header, you could enter the saluation
into a bookmark and then in the header use a cross reference to the
bookmark.
There is a problem however with such an approach as if the user is entering
the details directly into a bookmark, it is very easy for them to destroy
the book mark (it's almost certain that they will) and then the cross
reference will not work.
The best thing to do is really create a userform in the template. That is a
custom dialog into which the user enters information such as the addressee,
the address, the subject, etc. and then this information is then inserted
into the document at the required locations which are defined by the
insertion of bookmarks into the template.
See the article “How to create a Userform†at:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
--
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
austin said:
I've written a header macro which includes the date and page number. But,
I would also like to include as part of the header the salutation.
How do I do this? How do I tell word to look at the salutation then
insert that line into the header?