It seems I've looked everywhere, but can't seem to find the right way to format a quick part formula as percentage. Here is what I've tried.
Code:
Sub test()
With ActiveDocument.Tables(1)
.Cell(5, 5).Formula Formula:="=A2/B2*100"
.Cell(5, 5).Range.Text = Format(.Cell(5, 5), "0.00%")
End With
End Sub
I used the macro recorder and came up with the below, works fine, but of course it makes me select the table cell first.
Code:
Sub Macro3()
Selection.InsertFormula Formula:="=A2/B2*100", NumberFormat:="0.00%"
End Sub