Converting numbers to Roman Numerals in Microsoft Word

eemmpph used Ask the Experts™
I want to convert any number that I highlight to a roman numeral in my Microsoft Word document.

I already know how to use Ctrl+F9 to insert a field, and type a formula in the brackets:  {=4\*ROMAN} and do an Alt+F9 to toggle between the results and the formula.


Question 1:  Instead of me manually typing out the formula every time, is there a way I can hightlight an existing number in the document, say 2019, and replace with with  {=2019\*ROMAN} ?

Question 2:  I noticed if I copy {=4\*ROMAN} and paste it to another area of my document, then change the 4 to a 10, the end result still is IV, instead of X.  How come Word does not use 10 instead of 4?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


Forget question 2.  I see that after I change it from 4 to 10 while still highlighted, and press Alt+F9, it does change to X.
Top Expert 2012
You could use a VBA macro like this, You will need to Select the number in the document before running the code.

Sub ToRoman()
    Dim strText As String
    Dim fld As Field
    strText = Trim(Selection.Text)
    If IsNumeric(strText) Then
        Set fld = ActiveDocument.Fields.Add(Selection.Range, wdFieldEmpty, "=" & strText & "\*ROMAN")
    End If
    ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
End Sub

Open in new window


Thank you very much . . . That works for me!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial