strange table of contents behaviour

T

the3rdParty

In the doc I am working on the table of contents has started
misbehaving. If I click on a page number instead of navigating to
that page I get a message "Office cannot open the URL you have
specified. Make sure you have a web browser isnatlled and that it is
correctly configured".

I have tried deleting the ToCs and regenerating them, with the same
results.

IF I start a new doc and sent up headings and a ToC, the ToC works
fine an clicking on a page number navigates to that section.

Is this a corruption problem in the doc or has a doc setting got
changed somewhere?

thanks

jw

office 2004
os 10.4.11
iMac 7.1 (intel c2d)
 
J

John McGhie

That's a very strange condition :)

Office 2004 does not DO URLs in TOCs. The TOC generator is not capable of
generating them. That's a PC-Word only feature.

So if there are URLs in your TOC, they have come in from a PC.

In Word 2004, the "page number" is a cross-reference to a bookmark. When
you click on the page number, you are using "GoTo" to jump to a bookmark.
Achieves the same result, but it is a quite different mechanism.

What I suspect has happened is that you have not re-generated the TOC, or
you have regenerated it but specified "Page Numbers Only" instead of "Whole
Table".

When you regenerate the TOC and specify "Whole Table" Word rebuilds all of
the bookmarks to which the cross-references refer. That should fix the TOC
for you.

If it DOESN'T fix the TOC, then you are correct: the document has become
corrupt. This kind of corruption will not be fixed by the Maggie technique.
You will need to Save As and choose Web Page or RTF. Then re-open and
re-save as a .doc file.

Hope this helps


In the doc I am working on the table of contents has started
misbehaving. If I click on a page number instead of navigating to
that page I get a message "Office cannot open the URL you have
specified. Make sure you have a web browser isnatlled and that it is
correctly configured".

I have tried deleting the ToCs and regenerating them, with the same
results.

IF I start a new doc and sent up headings and a ToC, the ToC works
fine an clicking on a page number navigates to that section.

Is this a corruption problem in the doc or has a doc setting got
changed somewhere?

thanks

jw

office 2004
os 10.4.11
iMac 7.1 (intel c2d)

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
T

the3rdParty

from a PC? hmmm strange indeed as I havent used one fo them for at
least 12 years! the ToC by the way does not show up as being full of
URLs (blue underlining).

When I said I had replaced the ToC, I mean I completely deleted the
old one and reinserted a new one (I did not use the update field
process)

There are 4 ToCs in the doc (normal outlined text, figures, tables,
annexes) and all show the same problem.

Will try the RTF approach, but I am a bit worried about all that
formatting, graphics, cross references etc etc. Should they survive?
 
T

the3rdParty

The RTF route did not work - the ToC had the same problem after as
before!

I think I may have managed a rescue by opeing the doc in Apple's Pages
and then exporting it to Word again. After doing this and updating
the ToC all looks better , except for the styles which will have to be
redefined. This process revealed several paragraphs which Pages saw
as defined as being in the ToC but Word saw as normal text. At least
the figures are still all there.

jw
 
J

John McGhie

Yeah. Well done for solving your problem.

Yes, anything Word 2004 can create will survive a trip to RTF (not so Word
2008). Sadly, the corruptions usually survive also!

So yes, the document had several corrupt paragraphs in it.

A TOC cross-reference points to a hidden bookmark that occurs at the end of
the target paragraph. If the target paragraph corrupts, the bookmark will
not re-build, leading to the error you experienced.

The error message should not refer to "URLs" -- that's bug :) The TOC in
Word 2004 cannot contain URLs because the Word 2004 TOC generator can't
create them.

Deleting and re-inserting the TOC is the same as "Update fields" and
specifying "Whole Table". If you do it on a slow machine, you can see that
it actually deletes the old TOC then compiles a new one.

Cheers


The RTF route did not work - the ToC had the same problem after as
before!

I think I may have managed a rescue by opeing the doc in Apple's Pages
and then exporting it to Word again. After doing this and updating
the ToC all looks better , except for the styles which will have to be
redefined. This process revealed several paragraphs which Pages saw
as defined as being in the ToC but Word saw as normal text. At least
the figures are still all there.

jw

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
T

the3rdParty

John

The solution was by no means perfect as although the main ToC was
preserved, all the others (Tables, Figures, Annexes) were lost along
with the caption definitions, cross references in the text etc etc.

My experience with Word 2004 is that a doc with a lot of captions and
cross references to those captions easily becomes corrupted,
especially after many edits (this doc has about 60 figures, all of
which are cross referenced several times in the text). The problem is
particularly bad if you choose 'insert as hyperlink' when making a
cross reference, especially if the doc is at some time edited on
different computers.


jw
 
J

John McGhie

Hi Whatever Your Name Is:

Yes, I agree, the Word 2004 .doc format was not strong enough to withstand
vigorous editing of documents with lots of complex structures such as
figures and tables.

That was one of the main reasons for the upgrade to .docx -- .docx will
withstand that kind of thing a lot better.

The other TOCs won't be lost of you click "No" to the box that asks if you
want to replace the selected TOC, which pops up when you insert the TOC. If
you say "No" there, Word will add a new TOC at the position of the insertion
point.

But now you have that document "working" again, it's just a few clicks to
re-add the missing TOCs.

The cross-references are a much greater source of pain... Sadly, you may
need to re-create them all, one-by-one, because when you regenerate the
bookmarks, you break the destination objects for all the cross-references.

This does not "always" happen. If the cross-references were to bookmarks
that are not involved in the TOC generation process, those bookmarks should
remain in the text, and thus their cross-references will continue to work.

Select all the text in the document and hit F9. Then search for the word
"Error!" (with the exclamation mark). That will find any bad
cross-references.

Hope this helps

John

The solution was by no means perfect as although the main ToC was
preserved, all the others (Tables, Figures, Annexes) were lost along
with the caption definitions, cross references in the text etc etc.

My experience with Word 2004 is that a doc with a lot of captions and
cross references to those captions easily becomes corrupted,
especially after many edits (this doc has about 60 figures, all of
which are cross referenced several times in the text). The problem is
particularly bad if you choose 'insert as hyperlink' when making a
cross reference, especially if the doc is at some time edited on
different computers.


jw

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
T

the3rdParty

john

thanks for the replies

a note for the record:

I keep copies of my docs as I go along (under separate file names) and
looking thru these I can see when the problem started. It coincides
with when I started including a lot of hyperlinks to extenal docs and
somehow in the middle of this I changed the 'root' location for a
link.

They started looking like this:
Refs/Background/Capturing wealth from tuna.pdf

and then looked like this after the change
file://localhost/Users/the3rdParty/Pacific Study/Refs/Background/
Capturing wealth from tuna.pdf

I am not sure how I changed this (file locations in preferences
maybe?), but having done so the old ToCs and any old hyperlinks ceased
to work. Recent hyperliknks still work fine, but I am however
perplexed by the fact that I was unable to delete and substitute the
ToCs to good effect.

Regards

jim (for that is my name!)
 
J

John McGhie

Hi Jim:

Notice that it broke when it encountered the first "space" in the URL while
trying to rebuild the link? That's one of the less-than-endearing
"features" of Word hyperlinks.

Hyperlinks are not supposed to contain spaces, so the Word linking engine
can't cope if they do.

If the location of the target document is anything other than the "Current"
folder (being the folder containing the main document), Word will regenerate
the hyperlink as an explicit path containing the "Localhost" root.

Hope this helps

john

thanks for the replies

a note for the record:

I keep copies of my docs as I go along (under separate file names) and
looking thru these I can see when the problem started. It coincides
with when I started including a lot of hyperlinks to extenal docs and
somehow in the middle of this I changed the 'root' location for a
link.

They started looking like this:
Refs/Background/Capturing wealth from tuna.pdf

and then looked like this after the change
file://localhost/Users/the3rdParty/Pacific Study/Refs/Background/
Capturing wealth from tuna.pdf

I am not sure how I changed this (file locations in preferences
maybe?), but having done so the old ToCs and any old hyperlinks ceased
to work. Recent hyperliknks still work fine, but I am however
perplexed by the fact that I was unable to delete and substitute the
ToCs to good effect.

Regards

jim (for that is my name!)

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top