none
Powerpoint 2013 Add In (VB) : Setting resolution while exporting slide as image. RRS feed

  • Question

  • Hi,

    I am using 

    Slide.Export(ByVal FileName As String, ByVal FilterName As String, Optional ByVal ScaleWidth As Integer = 0, Optional ByVal ScaleHeight As Integer = 0) 

    method to export slide as an image in my Pwerpoint 2013 add in but I am not able to set the resolution (dpi) for the exported image which is coming out be the default value of 96dpi and hence the image quality is not good.

    I used the same method in Powerpoint 2007 and I was able to change the resolution programmatically by varying the dimensions in the Export() method parameters. But in Powerpoint 2013 the same aproach is not working.

    I also added registry entry ExportBitmapResolution with value as 300 at HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\PowerPoint\Options but to no use.

    Please provide any work around to change the resolution or improve the quality of the exported image.

    Thanks


    Wednesday, August 14, 2013 7:59 AM

Answers

  • Hi mrast2,

    Since you are using Office 2013, you should set registry entry ExportBitmapResolution with value as 300 at HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options.

    Then you can run the code below:

    Sub test()

        Dim slide As slide

        Set slide = Application.ActivePresentation.Slides(1)

        slide.Export "C:\Drafts \Export.jpg", "JPG", 300, 300

    End Sub

    The DPI value will be what you expect:


    Sophia Gou
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by swsdutt Monday, August 19, 2013 6:33 AM
    Friday, August 16, 2013 8:17 AM