Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for Number format in the Text Form Field Options Ed Hall 61 Microsoft Word Help 3 May 8th 05 07:51 PM
Header changes with text outside of header Connie Martin Microsoft Word Help 3 February 22nd 05 06:58 PM
How do I reformat a header on page 2 to be different from the hea. Ckanegae Microsoft Word Help 1 December 28th 04 10:43 PM
Same header but even/odd footer (sorry for the new thread) B?atrice Karjalainen Page Layout 1 December 16th 04 12:40 AM
How do I add the paragraph button under the Format header? kimism Microsoft Word Help 4 November 24th 04 03:32 PM


All times are GMT +1. The time now is 07:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"