![]() |
|
#1
|
|||
|
|||
|
I have a word document with many pages. At the head of each page there is a text.
Same text can be on many pages. If it's so, the same text is after each other. I have tried to create a table of contents of this text, but I am stuck completely. First I wanna create a blank first page. Then I wanna create a table of contents based on the page header text in the document. Ex: "Test text 1 from main page".........Page 1-3 "Test Text 2 from main page".........Page 4 "Test Text 3 from main page".........Page 5-7 * and so on... How can I do that with VBA? |
|
#2
|
||||
|
||||
|
It's not going to be possible using a Table of Contents in the sense of Word's TOC field.
It might be possible to create a macro to produce output like this but we would need to see a sample document to identify how the page headers change (either section breaks or styleref fields). First page and odd/even headers per section would complicate matters so this could become very tricky if you are not consistent with your document formats.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#3
|
||||
|
||||
|
Cross-posted at: http://www.excelforum.com/showthread...93#post4517093 and http://www.vbaexpress.com/forum/show...om-page-header
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| toc problems |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Header Info: Connecting seclected items for 1st page Header into Following Pages | SMHa | Word | 1 | 08-24-2016 10:00 AM |
MS Word 2010 Table Selector Selects Header On One Page and Rows On Next Page
|
scptech | Word Tables | 4 | 01-11-2016 02:55 PM |
| Picture pasted on first page below the header gets repeated on second page | dianabanana | Word | 1 | 03-19-2014 08:57 AM |
begin each section with page 1 in header PLUS continuous page numbering in footer
|
onemorecupofcoffee | Word | 18 | 09-04-2013 04:31 PM |
| How to save the current page in a new file with all the page settings (header, footer | Jamal NUMAN | Word | 6 | 03-15-2012 03:27 PM |