question

SergeySokur-6167 avatar image
0 Votes"
SergeySokur-6167 asked SergeySokur-6167 commented

Presentation with embedded restricted fonts doesn't open correctly from VSTO Add-in

When I open presentation with restricted embedded fonts(that I don't have installed) using VSTO add-in it opens it in read-only mode without asking anything, usually there is a dialog with the option to replace embedded fonts to open document in edit mode. Is there a way to force it using Microsoft.Office.Interop.PowerPoint?



office-vsto-com-dev
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What code do you use for opening a PowerPoint presentation?

Do you get the same results if you do the same steps manually?

0 Votes 0 ·

Hey Eugene,

With the code it always opens in read-only mode without asking:

     private readonly Application _application;
        
     public void OpenPresentation(string filePath)
     {
         var presentation = _application.Presentations.Open(filePath, Untitled: MsoTriState.msoTrue, ReadOnly: MsoTriState.msoFalse);
     }

But with manual steps it gives me the dialog first:

196857-image.png


0 Votes 0 ·
image.png (11.8 KiB)

You are passing false to open the file with removed restricted fonts:

ReadOnly: MsoTriState.msoFalse


If you need to preserve fonts and open the file in the read-only mode you need to pass true.

0 Votes 0 ·
Show more comments

0 Answers