cross reference

L

Lina

Hi
Is it possible to crossreference to a specific style? I´m making a template
with some special functions. Now the user want a function to be able to
crossreference to a specific style. Can you somehow get the
crossreferencedialog to onley show for example heading 9 ?
Lina
 
C

Cindy M.

Hi Lina,
Is it possible to crossreference to a specific style? I´m making a template
with some special functions. Now the user want a function to be able to
crossreference to a specific style. Can you somehow get the
crossreferencedialog to onley show for example heading 9 ?
No, you'd have to build the dialog box and the entire functionality yourself.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
L

Lina

Any suggestion where to begin?

I have already built a crossreferencefunction where I shows some specific
bookmarks (every bookmark that incudes the word special) in a list and then
uses
Selection.InsertCrossreference _
WdReferenceType.wdRefTypeBookmark, _
WdReferenceKind.wdContentText, _
lstItems.Value, True

Can I do something like that? But how can I show a list with all text that
has the wanted style, and how can I make a reference to that place? I feel
like I'm fumbling in the dark here...
 
C

Cindy M.

Hi Lina,
Any suggestion where to begin?

I have already built a crossreferencefunction where I shows some specific
bookmarks (every bookmark that incudes the word special) in a list and then
uses
Selection.InsertCrossreference _
WdReferenceType.wdRefTypeBookmark, _
WdReferenceKind.wdContentText, _
lstItems.Value, True

Can I do something like that? But how can I show a list with all text that
has the wanted style, and how can I make a reference to that place? I feel
like I'm fumbling in the dark here...
Not surprising, as it's a complex thing to do :)

you can use Word's FIND feature to locate each instance of the style in
question. I'd probably create a class and expose a member (property) for a
RANGE object. Assign each range you find to such a Range object and store it
in a collection. (Alternately, you could probably use a UDT (user-defined
type) and an array.)

You can then use this collection (or array) to generate the list (Range.Text
property), and later to reference the entry the user selects in order to
assign it a bookmark, which you can then cross-reference.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
L

Lina

Thank you very much for your suggestion! :)
and thank you for taking time to answer questions like mine.
I solved it almost like you sugested and it works very nice. :)
 

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