Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2012, 03:21 AM
Niy Niy is offline Table of Bookmarks Windows 7 64bit Table of Bookmarks Office 2010 64bit
Novice
Table of Bookmarks
 
Join Date: Mar 2012
Posts: 2
Niy is on a distinguished road
Default Table of Bookmarks


Hi,

I'm looking for a field function to generate a list of all bookmarks and their corresponding chapter. The Chapters are in the right formatting and a normal TOC works just fine.
Best would be in form of a table like:
Code:
-----------------------------------------------------
| Bookmark:           |  Chapter:                   |
-----------------------------------------------------
| Bookmark 1          |  3.9.1                      |
-----------------------------------------------------
| Bookmark 2          |  2.3.4                      |
.
.
.
.
If nobody can help me that way, I'm pretty good with python and can use the win32com to communicate with word, so if anyone knows how to determine the chapter of a current selection I can generate the tables myself.

Any help greatly appreciated
Reply With Quote
  #2  
Old 03-27-2012, 03:47 AM
Charles Kenyon Charles Kenyon is offline Table of Bookmarks Windows Vista Table of Bookmarks Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

This is more complex than you might imagine. Word does not track "Chapters" as such. Your chapters are probably (I would hope) designated by a multilevel list linked to heading styles.

To do this you would need to find the bookmark and then relate that to the previous heading.

The macro at https://www.msofficeforums.com/vba/1...bookmarks.html may help you get a start. Also Greg Maxey and Graham Mayor have bookmark utilities on their sites that might give you help.
Reply With Quote
  #3  
Old 03-27-2012, 04:04 AM
Niy Niy is offline Table of Bookmarks Windows 7 64bit Table of Bookmarks Office 2010 64bit
Novice
Table of Bookmarks
 
Join Date: Mar 2012
Posts: 2
Niy is on a distinguished road
Default

Yes,
my chapters are a multilevel list with heading styles, don't know any other useable way of creating a TOC ;-)

Listing all bookmarks was no problem with python, but getting the chapter-information is.

Going to check the homepages of the two out, hopefully I'll find something useful

Thank you
Reply With Quote
  #4  
Old 03-28-2012, 12:18 AM
macropod's Avatar
macropod macropod is offline Table of Bookmarks Windows 7 64bit Table of Bookmarks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
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

Perhaps you could explain why you're doing this. There may be a better way to achieve the desired result.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
bookmarks, field function, toc



Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Bookmarks Bookmarks in hyperlinks disappeared - HELP!!! Marcebrown PowerPoint 5 03-02-2014 09:13 AM
Table of Bookmarks Macro to list all bookmarks Marrick13 Word VBA 4 02-09-2012 08:00 PM
Bookmarks for a PDF? Ownaholic Word 0 10-30-2010 12:27 AM
Bookmarks with different figure references Dan_68 Word 0 02-15-2010 08:29 PM
Show bookmarks dempen Word 2 01-14-2010 11:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:24 AM.


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