Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WORD: turn headers on and off
Message
From
07/03/2001 15:27:51
 
 
To
07/03/2001 13:15:39
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00482750
Message ID:
00482878
Views:
12
Hi Tamar,

I have your book on automation and it is my bible. Thank you for your contribution.
I will play with this a while and update you on my progress. The 2 template thing may be hard to retrofit. I will will re-read your chapter on this materal and and then think about it over a cup of coffee tonight.

Regards,
Dr. G. (Neil)

>>Hi,
>>
>>I am using WORD automation. I have a letter that I want to print. I have included a header that mimics my letterhead. But sometimes I don't need it. Is there a way to turn the header on and off under automation? Is there a way when not in automation mode to have WORD print the letter with or without the header without totally deleting the header??
>>
>>Neil
>
>I don't know a way to print a document without the header once you put it in. Your best bet is to use two different templates - one with the header and one without.
>
>With Automation, headers and footers are stored in a separate HeaderFooters collection for each section of the document. You access it through the Headers and Footers properties of the section object. Here's an excerpt from my book ("Microsoft Office Automation with Visual FoxPro"):
>
>The kinds of headers and footers in a document (different first page, different on odd/even pages) are controlled through the PageSetup object and are discussed in the section "Setting up pages" earlier in this chapter. Header and footer content is stored in HeaderFooter objects, which are part of a HeaderFooters collection, accessed through the Headers and Footers properties of the Section object. Any section can have up to three of each, accessed via the constants wdHeaderFooterPrimary (1), wdHeaderFooterFirstPage (2), and wdHeaderFooterEvenPages (3).
>
>Once you find the header you want, you can deal with its contents like any other part of a document.
>
>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform