adding a header

V

vera

Please help me out! I'm new to Word VBA. I'm trying to
write a Word Document from a VB6 program. I'm struggling
through formatting the thing. How do I add a header? I
think I might need to add a section first, but I'm having
trouble locating any add header or add footer methods. Can
someone point me in the right direction?
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Vera,

ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text =
"Test"

will insert the word Test into the primary header of the first section of
the active document.

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