User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Word Help - Headers, VBA, and Field Codes Page [1]  
A Tanzarian
drip drip boom
10994 Posts
user info
edit post

I have a Word document where the header needs to contain the name of the current outline level (i.e. the last outline level from the previous page). For example:

1.0 afadggjahlkgj...

1.1 afkjlashfdla...

1.1.1 adfjalskdfhkjasdf...

2.0 afaskdfjhaskdf...

If section 1.1 crosses a page, then '1.1 title' needs to be in the header. If a page starts with a section (e.g. 1.1.1 is at the top of the page), then there doesn't need to be anything in the header.

This essentially means that each page needs its own header. Any ideas on how to pull this off? I've tried/thought about:

1) Manually inserting the headers as required. However, headers are tied to sections and I don't think this is possible without manually paginating the document using section breaks.

2) STYLEREF. There's an STYLEREF option that searches backwards--unfortunately it starts searching from the bottom of the current page. So if a new outline level starts somewhere on the page, it picks that up and never makes it to the previous page.

My guess is that I need some combination of VBA and field codes (like page numbers--it's the same field code on each page, but it still has a different value on each page). I've tried googling around, but haven't found anything to give me the breakthrough I'm looking for.

12/21/2008 2:30:07 PM

A Tanzarian
drip drip boom
10994 Posts
user info
edit post

bttt

12/22/2008 7:56:23 AM

agentlion
All American
13936 Posts
user info
edit post

http://en.allexperts.com/q/Microsoft-Word-1058/Chapter-title-header-own.htm ?

12/22/2008 9:45:09 AM

A Tanzarian
drip drip boom
10994 Posts
user info
edit post

Thanks, but that's not really what I'm looking for.

It requires creating a new section for each heading, which I can't do.

12/22/2008 6:36:07 PM

LimpyNuts
All American
16859 Posts
user info
edit post

^ Well that's how it's done. Alternatively, you can put each section in a table with title you want repeated in the first row. Then set the row to repeat as a header row across pages. ( link )

You can't have different headers on different pages without section breaks.

12/22/2008 9:01:58 PM

A Tanzarian
drip drip boom
10994 Posts
user info
edit post

Yeah, that's why I was hoping I could create a custom field code using VBA.

Stupid corporate formatting requirements

12/22/2008 9:28:26 PM

LimpyNuts
All American
16859 Posts
user info
edit post

Just do the table with the repeating header.

12/22/2008 10:47:49 PM

 Message Boards » Tech Talk » Word Help - Headers, VBA, and Field Codes Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.