julien1h
julien1h

Reputation: 85

How to change font size with replacement text

i have this code :

        For Each footr In word_fichier.Sections(1).Headers
            With footr.Range.Find
                .Text = MaFeuille.Cells(j, 1)
                .Replacement.Text = MaFeuille.Cells(j, 2)
                .Execute Replace:=wdReplaceAll
            End With
        Next footr
    Next j

And i want that the replacement text have another font size. Any ideas ?

Upvotes: 0

Views: 123

Answers (1)

FaneDuru
FaneDuru

Reputation: 42236

Please, use this easy adapted way:

        For Each footr In word_fichier.Sections(1).Headers
            With footr.Range.Find
                .Text = MaFeuille.Cells(j, 1)
                .Replacement.Text = MaFeuille.Cells(j, 2)
                .Replacement.Font.Size = 24 'use here the size you need...
                .Execute Replace:=wdReplaceAll
            End With
        Next footr

Upvotes: 1

Related Questions