A macro to italicise Latin in MS Word

I made a very simple macro that when clicked will italicise all Latin text in a Microsoft Word document.

Macros are bits of code that can be run in order to automate certain processes, such as the boring process of italicising all Latin text in your document. This macro will do this to any text marked with with the language "Latin (World)", so you will have to make sure that you have done this. You can usually change this by clicking on the "English" button in the status bar at the bottom of the window and selecting Latin from the modal box that pops up. I do this step as I go along, so its not very time consuming. It has the added benefit of removing the squiggling proof checking lines under any Latin text, which can be annoying and distracting from true errors, without having to add all the words to the custom dictionary or constantly selecting "ignore all". Of course if you need to do this to a large document, it might take you some time, so the same advise goes for using styles from the get go rather than applying them later.

The macro basically runs a find and replace all for any text string that is marked as Latin, and replaces the format from non italics to italics. You can achieve the same thing using the find and replace window, but this just makes it much quicker to execute.

Here's the code. You need to save this as a macro and can even add it it to the quick access bar at the top for ease of access (there are many tutorials online on how to do both of these).

Sub italiclatin()
' italiclatin Macro
    Selection.Find.LanguageID = wdLatin
    Selection.Find.Replacement.Font.Italic = True
    With Selection.Find
        .Text = ""
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub


Popular posts from this blog

How to cite primary and secondary sources in Microsoft Word (Ancient History / Classics / Biblical studies etc.)

CfP: Ethnicity and Imperialism at the time of the Roman Republic (CCC, Montreal, July 2017)

A book review of: Riess, Fagan (eds.). Topography of Violence in the Greco-Roman World