Title Case Cross-reference

K

Kurtis

I am having a rather difficult problem with something I thoght would be easy
and would really appreciate some help. I am trying to create a macro that
would allow me to change the format of a cross reference form Uppercase to
Title Case. Specifically, the word ARTICLE to Article. I know how to do
this natively in Word, but cannot find the method in VB. Any help would be
greatly appreciated.
 
K

Karl E. Peterson

Kurtis said:
I am having a rather difficult problem with something I thoght would
be easy and would really appreciate some help. I am trying to create
a macro that would allow me to change the format of a cross reference
form Uppercase to Title Case. Specifically, the word ARTICLE to
Article. I know how to do this natively in Word, but cannot find the
method in VB. Any help would be greatly appreciated.

The function in VB is: StrConv("SOME DATA", vbProperCase)
 
J

Jezebel

MyField.Result.Case = wdTitleWord

The problem with doing this with VB is that the changed case will revert as
soon as you update fields. An alternative is to set the *source* to title
case and set its font to All caps. Then use the \* Charformat switch in the
REF field: the result will ignore the All Caps setting.
 
M

macropod

Hi Kurtis,

If you bookmark the string to be cross-referenced, then a simple REF field
pointing to that bookmark can be used with a '\* Caps' switch to return the
source text in title case. For example:
'ARTICLE' bookmarked as 'BkMrk' and a REF field coded as '{REF BkMrk \*
Caps}' will return 'Article'.

Cheers
 
T

Tony Jollans

I know how to do this natively in Word, but cannot find the method in VB.

What are you doing natively in Word? A one-time format of the result, or a
permanent change to the field formatting?
 

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