Help : How to get the relative heading number by STYLEREF?

Y

Yang Xiangyu

I want to get the heading 2 number.
{SYTLEREF "Heading 2" \n} will get the Heading 1 number too, e.g., "2.3".
How can I get rid of "2." and remain only "3" ?
 
S

Suzanne S. Barnhill

Try using the \r switch instead of \n. From the description in the "Field
codes: StyleRef field" Help topic, it sounds as if this is what you need:

"Inserts the entire paragraph number of the bookmarked paragraph in relative
context - or relative to the paragraph numbering scheme - without trailing
periods."

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
K

Klaus Linke

Hi Suzanne,
Try using the \r switch instead of \n. From the description in
the "Field codes: StyleRef field" Help topic, it sounds as if this
is what you need:

"Sounds as if" -- perhaps; but the \r switch does the same as the \n switch
for me.

Probably the developers out-smarted themselves, because they couldn't figure
out what to implement from the description.
"Inserts the entire paragraph number of the bookmarked paragraph
in relative context - or relative to the paragraph numbering scheme -
without trailing periods."

What in h*** is that supposed to mean?
With styleref fields, you don't have any bookmarked paragraphs (except
possibly hidden bookmarks inserted by Word).
And "in relative context - or relative to the paragraph numbering scheme -"
just sounds Greek to me.

;-) Klaus
 
Y

Yang Xiangyu

Klaus Linke said:
Hi Suzanne,


"Sounds as if" -- perhaps; but the \r switch does the same as the \n switch
for me.

Probably the developers out-smarted themselves, because they couldn't figure
out what to implement from the description.

What in h*** is that supposed to mean?
With styleref fields, you don't have any bookmarked paragraphs (except
possibly hidden bookmarks inserted by Word).
And "in relative context - or relative to the paragraph numbering scheme -"
just sounds Greek to me.

;-) Klaus

Nod. I have tried \r and saw no difference with \n.
I thought that my not understanding help documents of word is due to
my poor english. It seems not my fault now.
 

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