Quote:
Originally Posted by gmayor
The following macro run as a custom process from Document Batch Processes to handle the folders (and subfolders) will change the fonts as required. Do however test it with one document on screen first to establish that it does what you require.
Code:
Function ChangeFont(oDoc As Document) As Boolean
Dim oStory As Range
On Error GoTo err_Handler
For Each oStory In oDoc.StoryRanges
oStory.Font.Name = "Trebucket MS"
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Font.Name = "Trebucket MS"
Wend
End If
Next oStory
Set oStory = Nothing
ChangeFont = True
lbl_Exit:
Exit Function
err_Handler:
ChangeFont = False
Resume lbl_Exit
End Function
|
Hello Sir, Can you please give me the code if I just have to change the font size. Like I have 220 word documents and I just have the change the font size from 14 to 8 in all of them. Just the code & command for font size change.
Thank you in advance sir