I am not quite sure whether you want to use the font size that is actually
applied to the text or the font size of the "clean" paragraph style (direct
formatting may have been applied). The following two examples may help you:
The following code line will find the font size applied to the first
character in the selection and change the style definition of the character
style “MyCharStyle†to that size:
ActiveDocument.Styles("MyCharStyle").Font.Size =
Selection.Characters(1).Font.Size
The following code line will find the font size of the paragraph style that
is applied to the first paragraph in the selection and change the style
definition of the character style “MyCharStyle†to that size:
With ActiveDocument
.Styles("MyCharStyle").Font.Size =
..Styles(Selection.Paragraphs(1).Style).Font.Size
End With
--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word