M
Malcolm Dew-Jones
I am using Word 2000
I have LISTNUM fields in a document. When I wish to add a
cross-reference then word displays a menu of listnums that
looks very much like a table of contents from which to choose
the link.
I want to embed something similar to that menu in my document.
It seems I can't just use a TOC because the TOC isn't based on
the LISTNUM fields. (I played with footnotes (instead of
listnum), but the hierachy of the listnum is important and
word automatically rearranges the levels if the document
changes, which is important to me.)
Suggestions on how best to do this would be appreciated.
E.G.
The document looks like this
1) This is about the widgets. 1.1) They are green
and 1.2) they are old.
2) Also consider the gadgets. 2.1) They are red
and 2.2) they are new, or 2.3) they have been
refurbished.
Lets talk about the colour (see 1.1 and 2.1) of the
different items in use, and their age (see 1.2, 2.2,
2.3).
I want to include a section at the end of the document that can
be automatically updated (like a TOC) and that looks like
1) This is about the widgets.
1.1) They are green and
1.2) they are old.
2) Also consider the gadgets.
2.1) They are red and
2.2) they are new, or
2.3) they have been refurbished.
That is basically the same as what word shows in the cross reference
dialog.
I did some quick experiments with VB, though I am not an expert in VB
so some intelligent use of word options would be better.
Also, in VB, I can find each listnum field, but I don't see how to
get the level numbers from the field after I find it.
Selection.NextField.Select
Set my_obj = Selection
MsgBox (my_obj.Text) ' show the field contents
my_obj.XXX how do I get the listnum level numbers?
As I said, suggestions on how best to do this would be appreciated.
Thanks, Malcolm
I have LISTNUM fields in a document. When I wish to add a
cross-reference then word displays a menu of listnums that
looks very much like a table of contents from which to choose
the link.
I want to embed something similar to that menu in my document.
It seems I can't just use a TOC because the TOC isn't based on
the LISTNUM fields. (I played with footnotes (instead of
listnum), but the hierachy of the listnum is important and
word automatically rearranges the levels if the document
changes, which is important to me.)
Suggestions on how best to do this would be appreciated.
E.G.
The document looks like this
1) This is about the widgets. 1.1) They are green
and 1.2) they are old.
2) Also consider the gadgets. 2.1) They are red
and 2.2) they are new, or 2.3) they have been
refurbished.
Lets talk about the colour (see 1.1 and 2.1) of the
different items in use, and their age (see 1.2, 2.2,
2.3).
I want to include a section at the end of the document that can
be automatically updated (like a TOC) and that looks like
1) This is about the widgets.
1.1) They are green and
1.2) they are old.
2) Also consider the gadgets.
2.1) They are red and
2.2) they are new, or
2.3) they have been refurbished.
That is basically the same as what word shows in the cross reference
dialog.
I did some quick experiments with VB, though I am not an expert in VB
so some intelligent use of word options would be better.
Also, in VB, I can find each listnum field, but I don't see how to
get the level numbers from the field after I find it.
Selection.NextField.Select
Set my_obj = Selection
MsgBox (my_obj.Text) ' show the field contents
my_obj.XXX how do I get the listnum level numbers?
As I said, suggestions on how best to do this would be appreciated.
Thanks, Malcolm