in order to check some word documents for consistent formatting, I would love to get a list of all the different fonts that are used / applied to a certain document. I couldn’t find an option for this in the GUI, but could this be done programmatically with VBA? I don’t have any VBA experience, but some pseudo code like this should work, right?
all_fonts = []
for paragraph in all_paragraphs
for each word in paragraph
if word.style not in all_fonts
all_fonts.append(word.style)
print all_fonts
Yes: there’s an implementation of reading all fonts from a document here which follows that pattern.