From Excel I am editing a Microsoft Word document. I have a table in my Word document where column 4 consists of a number and then the letters wk after it.
Example:
+------+------+------+-------+
| Col1 | Col2 | Col3 | Col4 |
+------+------+------+-------+
| test | 2 | 123 | 1 wk |
| test | 2 | 123 | 13 wk |
| test | 2 | 123 | 10 wk |
+------+------+------+-------+
I am trying to change the font size of the letters wk. I figured I could do this with selection and then replace the letters, but it's definitely not working in VBA via Excel. How can I achieve this?
My current code:
Tbl.Columns(4).Select
WDApp.Selection.Find.ClearFormatting
With WDApp.Selection.Find
'.ClearFormatting
.Text = "wk"
.Replacement.Text = "wk"
.Font.Size = 9
End With
WDApp.Selection.Find.Execute Replace:=wdReplaceAll
.Replacement.Text
’s size