DSC said:
I need a convenient way to be able to find specific cross-references in a
large document (and to know what they are without having to follow the
link), but the most obvious way of searching the field codes (when in
displayed instead of field results) is meaningless with cross-references
unlike with bookmarks (e.g. NOTEREF _Ref203031962 etc.). The solution that
I found is that I could add descriptive text to the end of the field code
with no apparent harm done in a small test case. I was wondering if I
adopted this on the scale of my large document whether I would eventually
introduce some sort instability, unreliability, or other types of problems?
Or is there some other solution?
Jonathan West - Word MVP:
www.intelligentdocuments.co.uk
I've no evidence either way as to whether your idea promotes instability in
a document. I'm always hesitant to rely on undocumented features - you never
know whether or when Microsoft might decide the make a change that happens
to affect the feature. if they do, and you relied on it, and your code no
longer works, you have no reason to complain at all.
Therefore, I would suggest that you try very hard to find an alternative
solution before you decide to go down this road.
One thing you might not realise is that _Ref203031962 is in fact a bookmark
name. It is referencing a hidden bookmark, and therefore does not show up in
the Insert Bookmark or the Edit Goto dialogs or even in the Bookmarks
collection of the Document unless you set the Bookmarks.ShowHidden property
to True.
Once you have set ShowHiddent, you can manipulate hidden bookmarks just like
any other.
DSC reply:
Thanks guys for the rapid responce to my question. I was aware of the hidden
bookmark feature, but it still gives me list of meaningless numbers that
force me to follow the hyperlink or use some other indirect method to figure
out what a particular hidden bookmark is referring to. I my document I
frequently have 3+ cross-references in line, and it becomes annoying to
follow all the links to figure out what they all are plus having to find my
way back, even with the help of an extensive document map. More importantly
is when I want to make changes to the cross-references, the former process
is error-prone which could rapidly add up in my large document. Further
alternative solutions that seem possible to me would be to have an
internet-style back button that would allow me to back track along a
recently used hyperlink (i.e. a reverse hyperlink?). Ideally the cross-ref.
would behave like the footnote it referres to and would display the footnote
text in a pop up initiated by the cursor. I've tried putting comments over
my cross-refs. to achieve the latter put I need to delete then to use the
hyderlinks, suppose I could add hyperlinks to the comments again but that is
not so attractive unless automated. Alternatively is there a way I can force
word to allow me to choose a name for the hidden bookmarks of
cross-references as for 'regular' bookmarks? A way I tried to make this work
was by bookmarking at various places in the footnote text and
cross-referencing to the bookmark instead of the footnote, but unfortunately
the bookmark doesn't follow the original text properly when making the
various types of changes to the footnote section.
Does any of this inspire any further suggestions from you guys?
Any help is greatly appreciated, DSC