none
How to Find CrossReference Fields Source Position using C# Interop Word RRS feed

  • Question

  • Dear All,

    How to Find CrossReference Fields Source Position using C# Interop Word

    When we click on any Fields then it goes to Source Position, how can we find this source position.

    Thanks

    Sandy

    Monday, June 17, 2019 7:24 AM

All replies

  • Read the cross-reference field's code. The field's Code.Text property will return something like:

    REF BkMk \h

    where 'BkMk' is the name of the bookmark the cross-reference refers to.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, June 17, 2019 7:44 AM
  • Macropod, Thank you very much for the help .

    How can I Veryfy that the cross referenced field after clicked redirected to valid source position by C#?

    Monday, June 17, 2019 8:25 AM
  • Test for the existence of the bookmark, via the Bookmarks.Exists method. For example:

    ActiveDocument.Bookmarks.Exists("MyBookmark")


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Tuesday, June 18, 2019 8:48 AM