Font Substitution

M

Mike Faulkner

Hello
OS: Windows XP
App: Word XP
I would like to obtain some VBA that will permanently convert all
Substituted Fonts to "Times New Roman". The code below will permanently
convert a single known substituted Font. I am looking for VBA that will loop
through all Substituted Fonts.

Application.SubstituteFont UnavailableFont:="Times New Roman Bold",
SubstituteFont:="Times New Roman"

PLease don't burn too much midnight oil on this one, however, a result would
be outstanding.

Regards
Mike
 
K

Klaus Linke

Hi Mike,

You can get the first missing font (if any) from the dialog:

With Dialogs(wdDialogFontSubstitution)
MsgBox .UnavailableFont, , .SubstituteFont
End With

But for the rest, nothing seems to be working.

I tried, unsuccessfully, to fudge something with SendKeys.
Also I tried whether .SubstituteFont returns any value depending on whether
the font substitution was necessary or successful... not the case.

You probably could try to find all the fonts used, and replace anything you
don't want/know with TNR?

Maybe you should take care with symbol fonts (non-Unicode fonts like
"Wingdings"), since the characters would turn into square boxes in TNR.
(I don't know how to determine whether a font is a symbol font though... it
might be possible using the Windows API)

Klaus
 
M

Mike Faulkner

Klaus

Many thanks for trying. I'll keep looking, someone must have managed it.

Regards
Mike
 
K

Klaus Linke

Good luck! If nobody has a bright idea in this thread in the next couple of
days, you could perhaps try again.
I just did a Google search and found a few old threads on the topic, but
nothing promising. Too bad the dialogs are so unaccessible (and have become
even more so in recent versions).

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top