office interop - How to check whether the presentation contains some non-standard font? -


i writing addin powerpoint. using powerpoint 2013, c#, visual studio 2013.

when open existing presentation created , modified on computer (e.g., mac or linux), texts in non-standard true type fonts prevent me saving presentation.

error

so question is

1) possible catch , handle error in code?

2) or there way check whether presentation contains non-standard font?

thanks

nothing's preventing saving presentation such; message telling because presentation uses fonts not embeddable, cannot save presentation fonts embedded.

you can @ presentation's .fonts collection , determine each font whether it's embeddable or not:

sub fontlist()     dim x long     activepresentation.fonts         x = 1 .count             debug.print .item(x).name & vbtab & .item(x).embeddable         next     end end sub 

if find unembeddable fonts, opt save presentation w/o embedding fonts (third parameter saveas set false rather true).

or more practically, use .fonts.replace substitute different font (one embeddable). expect you'd have create own replacement table this; if font's not present on system, windows have substituted font, ppt won't tell font is.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -