Macro to replace all Windows fonts fails

Running LibreOffice 7.0.0.3 on Linux 5.8.0-1-default [openSUSE Tumbleweed 20200818]

If I open a .docx and record a new macro to replace Verdana and Arial with “DejaVu Sans”, I see no references of the font names in the macro, and the macro does nothing al all.

  • I enabled recording macro’s

  • Start recording macro

    • Ctrl-H
    • Focus on Find
    • Hit [Format]
    • Choose “Verdana” font
    • Hit [OK]
    • Focus on Replace
    • Hit [Format]
    • Choose “DejaVu Sans” font
    • Hit [OK]
    • Check [:heavy_check_mark:] Including Styles
    • Hit [Replace All]
    • Focus on Find
    • Hit [Format]
    • Choose “Arial” font
    • Hit [OK]
    • Hit [Replace All]
    • Hit [Close]

Hit End recording

This looks like a case where you have to write code, not just use the recorder.

Start learning with Andrew Pitonyak’s Useful Macro Information.