Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word: omit header on all but first page
Message
From
05/05/2006 13:52:42
Charlie Hancock
California Dept of Public Health
Richmond, California, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Word: omit header on all but first page
Miscellaneous
Thread ID:
01119691
Message ID:
01119691
Views:
51
I'm trying to automate Word 2002 from VFP 9 for the first time. I have one Word doc that acts as letterhead (has only a header & footer). I have another doc that contains boilerplate text. I'm trying to insert the text into the letterhead, and I only want the header & footer to appear on the first page of the final doc.

My approach so far:

1. Open the letterhead doc.
2. Save it as another name, using the SaveAs() method.
3. In the resulting doc, use the Insert() method to insert my boilerplate text doc.

So far, so good. But if the doc is now more than one page, I only want the original letterhead header & footer on the first page. I've tried setting PageSetup.DifferentFirstPageHeaderFooter = .T., but that ends up including the header & footer on all *except* the first page. If I set PageSetup.OddAndEvenPagesHeaderFooter = .T., I get the result I want, but only if the final document is two pages; the header & footer reappear on all odd-numbered pages.

Thanks in advance for any suggestions!
Charlie Hancock
Next
Reply
Map
View

Click here to load this message in the networking platform