Word - Headers & Footers

Dawn M

Member
I'm trying to put a footer on only page one of a Word document using Progress COM Objects.

Anybody know how to do this?
 

gcampbell

Member
I don't know how to do it via COM, but if you do it within Word itself you need to create the page as a separate section, then associate the header with that section.

This may help you ....

Later,
Gordon
 

joey.jeremiah

ProgressTalk Moderator
Staff member
If you can it would be a great help.

You'd be able to record a macro and write an equivalent 4gl/abl code.
 

Dawn M

Member
Word - Header & Footers

Thanks for the replies, gentlemen.

This is supposed to work, but I can't get it working....

objWord:ActiveDocument:Sections(1):Footers:Range:Text = ...

Progress barks at the "Sections" command.

Anybody familar with getting the Sections part working?
 

lord_icon

Member
Static??

Why are you trying to do this on-the-fly (dynamicaly).
Why not just create a word document, with the headers and footers required. Simply OUTPUT THROUGH - THAT document, using it in the template method. If you can NOT use a generic file, could you use a number of generic files to be your template to output to?
 

DMM

New Member
Re: Word - Header & Footers

I had a similar problem. Use this:

v-sec = v-word-appl:activedocument:sections:item(1).
v-sec:pageSetup:DifferentFirstPageHeaderFooter = True.
v-Sec:Headers:item(2):Range:Text = "Page1 -- First Page Header".
v-Sec:Footers:item(2):Range:Text = "Page1 -- First Page Footer".
v-Sec:Headers:item(1):Range:Text = "Other pages".
v-Sec:Footers:item(1):Range:Text = "Other pages".
 
Top