You cannot accomplish this by using the style definition.
What would probably be better would be to format the actual heading 2s in
the document in that way which can be done by using a macro containing the
following code
Dim H2 As Range
Selection.HomeKey wdStory
Selection.Find.Style = wdStyleHeading2
With Selection.Find
Do While .Execute(FindText:="", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Set H2 = Selection.Range
H2.Case = wdTitleWord
Selection.Collapse wdCollapseEnd
Loop
End With
Then update the table of contents.
The following code will however make the change in just the table of
contents, but if the table of contents is subsequently updated, the Heading
2 entries will revert to their original format:
Dim H2 As Range
Selection.HomeKey wdStory
Selection.Find.Style = wdStyleTOC2
With Selection.Find
Do While .Execute(FindText:="", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Set H2 = Selection.Range
H2.Case = wdTitleWord
Selection.Collapse wdCollapseEnd
Loop
End With
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com