Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Pagebrakes and pageheadings/footings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Karlström - 19 Sep 2006 14:31 GMT
Hi

I'm developing a COM-Addin for Word as a part of a integration to a system
for document management.

It is a rich and database-dependent Addin which creates and maintains
documents using specialized toolbar functions.

We have a problem:
One of the objects is to fully create pageheaders/footings for the first
page and a different ones for the following pages.
When a new document is created we check if the document consists of 1 or
more pages. If there is only one page, a pagebreak is inserted in order to
create the correct pageheader (and foot) for page 2 and forward.

The problem is that when we create a new "template" the document refuses to
accept different pageheadings/footings than the first one. There seem to be
some sort of property in our original template that works OK, but in new
templates it just doesn't work.
An "easy" but unproffessional approach would be to tell the customer to use
the OK template and copy it for creating new ones, but this is not the
solution we want to deliver.

Does anybody know what this setting is and how to change it?

Thanks in advance

Regards
Peter Karlström
Midrange AB, Sweden
Signature

Peter Karlström
Midrange AB
Sweden

Cindy M. - 19 Sep 2006 14:54 GMT
Hi =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?=,

> We have a problem:
> One of the objects is to fully create pageheaders/footings for the first
> page and a different ones for the following pages.
> When a new document is created we check if the document consists of 1 or
> more pages. If there is only one page, a pagebreak is inserted in order to
> create the correct pageheader (and foot) for page 2 and forward.

This shouldn't be necessary. The headers/footers exist logically in the
document, even if they can't be seen. Just manipulate the appropriate range

Dim rngHeaderFirstPage as Word.Range
Dim rngHeaderOtherPages as Word.Range

Set rngHeaderFirstPage =
ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range

Set rngHeaderOtherPages =
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Peter Karlström - 19 Sep 2006 15:05 GMT
Hi Cindy

Thanks for your quick reply.

I'll look into that.

Regards
Signature

Peter Karlström
Midrange AB
Sweden

> Hi =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?=,
>
[quoted text clipped - 24 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.