Home > Mobile >  How to change font size with replacement text
How to change font size with replacement text

Time:06-08

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 ?

CodePudding user response:

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
  • Related