Simplifying finding cross-refs: adding descriptive text at end of NOTEREF field harmless or not?

D

DSC

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?


DSC
 
J

Jonathan West

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?


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.
 
P

Peter Jamieson

1. I agree with Jonathan's analysis

2. I'm not sure this is workable either, but you could consider adding a {
SET } next to each { NOTEREF } e.g.

{ SET COMMENT "some text" }
or perhaps
{ SET C some text }

If you have a large number of NOTEREFs, that would obviously result in a
substantial number of extra fields which might affect performance, but
perhaps worth a try.
 
D

DSC

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.
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
DSC reply:
Thanks guys for the advice and quick responce. I did know about the hidden
bookmark feature, but that still leaves me with a meaningless list of
numbers which forces me to go to the particular link to figure out what is
there. Where this becomes particularly annoying and prone to error is when
I have 3 or more cross refs. in a row (which frequently happens) and I need
to move, modify, or add to this list. I extensively use the document map,
but it would be much better if I could just put the cursor over the cross
ref. and a popup appears with the reffered footnote text as if it was a
footnote itself. Even if I had in internet style "back" button to backtrack
after following a cross ref. hyperlink that would be O.K. too.
Alternatively is there some way I could force word to let me choose a name
for the normally hidden bookmark of footnotes (e.g. 'JounalName2008_p1010'
instead of _Ref203031962) or get bookmarks to behave like footnotes and
properly keep track of numbering as I add or remove other bookmarks/
footnotes (I tried this and I seems that bookmarks don't behave properly
when used in the footnote section. When I intert a new footnote above an
existing footnote any bookmarks on the latter do not follow the renumbering
properly). I have even tried adding comments on top of my cross refs but I
have to delete the comment before I can follow the hyperlink.

Any additional thoughts?

DSC
 
D

DSC

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
 
J

Jonathan West

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.

Well, the field result should give you some clue as well.
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?).

That is already available, in two forms

1. Press Alt-Left Arrow

2. On the Web toolbar click the first button

The button on the web toolbar can be copied to any other toolbar as well.
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.

Unfortunately, Word doesn't do that
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.

It wouldn't be all that difficult to write a bit of VBA that would process a
document and enclose all th REF fields in HYPERLINK fields which point to
the same destination and have a tooltip defined which contains the whole
text of the referenced paragraph. If you need help with writing such a
macro, pop across to the one of the Word VBA newsgroups and I'm sure we can
help.
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?

Not directly. You can create a bookmark marking any piece of text you want,
and create a REF field that points to it. But you can't force a naming
convention on the bookmarks Word automatically generates.
 
M

Maribeth

To DSC - I'm having the exact same problem with my cross references - the
most frustrating part for me HAS to be that this all worked wonderfully in
Word 2000 - I could insert cross references (inserted as hypertext from
Headings (formatted using MS Headings 1-9 - those magical styles that have
also taken a hit in this new and improved 2003 *frown*) and I could click on
the Back button from the web toolbar and get exactly back where I "jumped"
from. BUT NOT IN 2003. In this wonderful upgrade my company is going
through I am brought from Word 2000 in NT to Word 2003 and XP and NOTHING
works - mail merged documents keep looking for their data source (even though
the docs have been merged and there IS no data source needed any longer...)
default printer settings are kaput and anything with a "hotlink" (old
terminology I know - I've been at this many years) such as cross references,
TOCs and TOAs simply .. don't work - they aren't HOT - you can't get BACK to
where you jumped from.

To Jonathan West - the first button on the web toolbar does NOT take one
back to the cross reference point in the document. You are taken back to the
beginning (or close) of the entire document. Here's the scoop: I'm working
in a 113 page document and when I'm on page 42, in Section 4.3 and referring
to something in Section 1.4 - and I click ON the Section 1.4 cross reference
I am taken to that Section 1.4 (yeah - at least that DOES work) BUT when I
click on the back button of the web tool bar and am NOT taken back to Section
4.3 (so that I can continue reviewing and proofing my document) - I am taken
back to the beginning of the flinging document!!!! So from page 42 I go to
page 13 and then back to page 1 (or thereabouts - it seems actually to take
me back to the very first cross reference inserted - not helpful) and if I
want to go back to page 42 I either have to GO TO that page or get up the
document map and try to remember that I was in Section 4.3 to begin with.
The same is true of the TOC feature. The Alt-Left Arrow suggestion gets me
the same thing (back to the beginning of the doc) AND something strange
happens to my track changes - suddenly the outline numbering, which hasn't
given me ANY problems since I designed the templates I copy them in from in
2004 - doesn't work and I have Section numbers dropping out left and right.
 

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