
Originally Posted by
gloub
Hi !
I'm trying to write a macro that would set every line break on 8 points, but the macro recorder keeps no trace of the font size :
Could anyone help me make it work ?
Many thanks !
I'd use Styles for formatting like this, but to answer the question
Option Explicit
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Size = 8 ' <<<<<<<<<<<<<<<<<<<<
With Selection.Find
.Text = "^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
In the F&R dialog, put your cursor in Replace With and click Formatting and select Font
Capture.JPG