Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2016, 06:28 AM
pirre pirre is offline TOC from page header? Windows 8 TOC from page header? Office 2013
Novice
TOC from page header?
 
Join Date: Nov 2016
Posts: 1
pirre is on a distinguished road
Question TOC from page header?

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?
Reply With Quote
  #2  
Old 11-06-2016, 03:22 PM
Guessed's Avatar
Guessed Guessed is offline TOC from page header? Windows 10 TOC from page header? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,163
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 11-06-2016, 04:15 PM
macropod's Avatar
macropod macropod is offline TOC from page header? Windows 7 64bit TOC from page header? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Tags
toc problems



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
TOC from page header? 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
TOC from page header? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft