My scenario is that I want to change font size of content body excluding title,headings,sub headings,TOC using VBA macro ,simply means change the font actual content body using macro (Normal style applied to actual content)
Here is my VBA code:
Private Sub Document_Open()
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Text = ""
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
.ClearFormatting
.Replacement.ClearFormatting
.Font.Name = "Arial"
.Replacement.Font.Name = "Calibri"
.Execute Replace:=wdReplaceAll
.ClearFormatting
.Replacement.ClearFormatting
.Font.Name = "Times New Roman"
.Replacement.Font.Name = "Calibri"
.Execute Replace:=wdReplaceAll
.ClearFormatting
.Replacement.ClearFormatting
.Font.Size = 11
.Replacement.Font.Size = 10
.Execute Replace:=wdReplaceAll
End With
End Sub
using this code the whole document font size is changing but font name changing only actual content only using above macro.
Is it possible using VBA macro o change actual contents of document?
Can you suggest me how can I do it using VBA Macro?