PDA

View Full Version : Bookmarks Disappear



Mavila
05-16-2017, 09:54 PM
OK, I'm about to give up on this project. So frustrating.

I've described it before - 50 source documents combined into one target. The source documents vary according to what the user chooses.

Each source document is a chapter and separated by SectionBreak.

I've tried Selection.InsertFile and Open/Copy/Paste. Neither works particularly great.

After bouncing back and forth between those two options, I'm back on Selection.InsertFile.

On the more lengthy chapters/sections, I have a Table of Contents (TOC). I've bounced around on different ways of doing this (Styles, f-switches and bookmarks). None of them are particularly good options I've come to learn, painfully.

My latest strategy is the TOC generated from bookmarks. It works great until I do the selection.insertfile on the next chapter - I lose my bookmarks on the previous chapter which renders the previous chapter's TOC useless.

I've even looked at copying the TOC after it's generated, then copying it, deleting the original TOC and doing a pastespecial (CTRL+U equivalent - picture). That doesn't work either. It pastes but doesn't look anything like it should.

I'm kind of at my wit's end. If anyone has some insight, I'd appreciate the help.

My last ditch effort will be to configure the TOCs after they've all been compiled into the target document.

If that doesn't work, I'm going to have to give up on multiple TOCs, I'm afraid.

gmayor
05-16-2017, 10:43 PM
Bookmark names must be unique. If you have the same names in the inserted files as in the file you are inserting into then inevitably something has to give.

macropod
05-16-2017, 11:37 PM
You could, of course, keep the documents separate and, for consolidation purposes, use INCLUDETEXT fields to link them all into a single document. That way, you don't have to worry about what's going to happen with your bookmarks AND you can have both an overall TOC and individual Section TOCs. Alternatively, you might just use a TOC with RD fields in the consolidating document, so it ends up with just the 'master' TOC.

Mavila
05-17-2017, 07:34 AM
They are unique. For some reason, if the bookmark has text contained within it the bookmark disappears when the next file is pasted or inserted. Bookmarks that don't contain text (simple placeholders) don't have that problem. I wonder why that's the case.

Mavila
05-17-2017, 07:36 AM
Thanks for the tip. I'm not familiar with that. I'll check it out.