How to enum the unavailable fonts in a word document?

M

Max Liu

Dear friends,

I want to enum the unavailable fonts in a word cocument, but I dont want to
enum each character or word in this document.
Now, I have an alternative solution :

1. Affirm that unavailabe font exists by using Application.Dialogs with
parameter wdDialogFontSubstitution.
2. Save it as OpenXML format if this document is formated to other format.
3. Access the FontTable in this document through the System.IO.Packaging
namespace.
4. Enum each of font in the FontTable and affirm which doesnt exists in
Application.FontNames.

Here is a translation possibly.

Does the more efficient solution exist, please tell me.

TIA

Max Liu
 
J

Jean-Guy Marcil

Max Liu was telling us:
Max Liu nous racontait que :
Dear friends,

I want to enum the unavailable fonts in a word cocument, but I dont
want to enum each character or word in this document.
Now, I have an alternative solution :

1. Affirm that unavailabe font exists by using Application.Dialogs
with parameter wdDialogFontSubstitution.
2. Save it as OpenXML format if this document is formated to other
format. 3. Access the FontTable in this document through the
System.IO.Packaging namespace.
4. Enum each of font in the FontTable and affirm which doesnt exists
in Application.FontNames.

Here is a translation possibly.

Does the more efficient solution exist, please tell me.

TIA

Max Liu

Have you tried your idea?
Is it faster than scanning characters?

For another idea, here is a suggestion from Doug Robbins:

"If you open the document in the "Recover text from any file" mode, a list
of the fonts used will appear at the bottom of the document. "

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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