none
Using PowerPoint Export Api thru IUnknown Interface between version 2010(14) and 2013(15) to extract shape from .pptx into emf files RRS feed

  • Question

  • As described in subject, I am trying to export a shape from a .PPTX file to EMF file using the EXPORT api. It works perfectly in 2010 and any previous versions, but on 2013, the EMF file size jumped from ~3000 bytes to ~300,000, no code changes has been made.

    I did a OPEN on the .PPTX by Powerpoint thru COM interface, and it reports success.

    The EXPORT also reports success, not HR(failed)..... on the 2013, but just EMF file is bad.


    • Edited by PCT52 Thursday, November 14, 2013 5:55 PM
    • Moved by Jeffrey_Chen_Moderator Saturday, November 16, 2013 8:21 AM general office development question
    Thursday, November 14, 2013 5:55 PM

All replies

  • What do you mean using Powerpoint Export API through IUnknow interface?

    As far as I know, there is no such method in the IUnknow interface. Would you mind share some code snippet for troubleshooting?

    I wrote a simple sample to export the share from Powerpoit 2013 through Microsoft.Office.Interop.PowerPoint:

      PowerPoint.Application ppt = new PowerPoint.Application();
                PowerPoint.Presentation pre=ppt.Presentations.Open(@"C:\Users\Person\Desktop\Hello.pptx");
                pre.Slides[1].Shapes[1].Export(@"C:\Users\Person\Desktop\Hello.emf", PowerPoint.PpShapeFormat.ppShapeFormatEMF);

    As you mentioned the EMF file is bad, do you mean the file is damaged? How big is the EMF file when you export the shape form Powpoint 2013 manuanlly?

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 15, 2013 1:22 PM
    Moderator
  • GdipRecordMetafile() call back routine on 2010 PowerPoint seems to be delivering a frameUnit of 7 (GDIunit of 0.01mm/pixel), but for 2013, it delivers frameUnit of 2, (pixelUnit). Is there a way to make 2013 do it the same way as 2010?

    • Edited by PCT52 Tuesday, November 26, 2013 7:41 PM
    Wednesday, November 20, 2013 9:39 PM