View Single Post
  #6   Report Post  
Posted to microsoft.public.word.docmanagement
RichUE RichUE is offline
external usenet poster
 
Posts: 35
Default Edit Field - Format settings

Thanks Graham, that's great.
--
Richard
Using Office 2003 & Win2kpro

Search the web and raise money for charity at www.everyclick.com


"Graham Mayor" wrote:

Some things you cannot do with the macro recorder and you have to code by
hand. In this case you want to add a Firstcap switch to a selected field.
The following is one way to do that

Sub AddFirstCap()
Dim oField As Field
Set oField = Selection.Sentences(1).Fields(1)
If InStr(1, oField.Code.Text, "\*Firstcap") = False Then
oField.Code.Text = oField.Code.Text & " \*Firstcap"
End If
oField.Update
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"RichUE" wrote in message
...
I often record a macro to repeat often-used keystrokes, but today I found a
keystroke that couldn't be recorded. I use Tools, Macros, Record a new
Macro
and assign it to a toolbar.
In my document, I have some cross-references to bookmarks. Some bookmarks
begin with a lower-case letter (due to the context in which they are
used),
but this may be changed in the cross-reference by right-clicking on the
field, Edit field, Format - First capital.
However, when trying to capture this sequence in a macro recording, the
right-click function is not available. Is there an alternative keystroke I
can use? I couldn't find a relevant menu option.
--
Richard
Using Office 2003 & Win2kpro (soon to be Office 2007 & W7)

Search the web and raise money for charity at www.everyclick.com



.