title: Export ppt slide as image with custom dpi using VBA
body: <p>I want to export the slides of PowerPoint with a decent quality but not to much size. So the first thing I do for that is to add this registry key in HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options: AutomaticPictureCompressionDefault with value 0</p>
  
  <p>This is to prevent the automatic compression of images and I use this code to export the slides as images:</p>
  
  <pre><code>For Each oSlide In ActivePresentation.Slides
      sImageName = "Slide" &amp; oSlide.SlideNumber &amp; ".PNG"
      oSlide.Export sImagePath &amp; sImageName, "PNG", 2048, 1536
  Next oSlide
  </code></pre>
  
  <p>The thing is that the size is to big and I want to decrease it with a lower DPI because the size should be 2048x1536 so is not convenient to modify this. How can I set the desire DPI? Is there a way in VBA or in the registry to set the DPI value I want to use?</p>