View Single Post
  #1   Report Post  
Max Moor
 
Posts: n/a
Default How can I retrieve the format of a header reference?

Hi All,
I'm learning, little by little. I know that I can reference the text
that a cross reference field shows in the doc with:

strCode1 = oRg.Fields(1).Result.Text

Now, I'd like to be able to return the style of the header that the
cross-reference field refers to. For example, I search and find a cross
reference to a header. The code line above returns "Rubber Chickens."

In the document, Rubber Chickens' style is 'Heading 2'. Can I, in VB
code, get "Rubber Chickens" by way of the cross-reference field? I tried:

strCode2 = oRg.Fields(1).Result.Style

Of course, that gave me the style of the cross-reference field, not
the heading it refers to (as I wish).

Thanks for the help, Max