Setting resolution of exported images from VB

M

mario70xx

I have an application where I have to export the PowerPoint slides as
JPG files. Now I need to use a higher resolution for my images (from 80
dpi to 240 dpi).

I set the ExportBitmapResolution register. When I export a slide from
PowerPoint Application the slide is generated according to the setted
resolution.

When I export the slide from my application the resolution is always at
80 dpi.

The version of the MSPPT.OLB is 11.0 (PowerPoint 2003).

Can someone help me?

Thanks in advance.
Mario
 
M

mario70xx

Shyam,
I have read this article but it doesn't work when I export the slide
from my VB application.
The MS indication works only when you are exporting the slides using
PPT application.

Regards,
Mario
 
M

mario70xx

Steve said:
It's hard to offer specific suggestions for fixing your code when it's
invisible. ;-)

But try using the .Export method on each slide. It takes the filename, export
type and X, Y resolution as parameters.




-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

Hi Steve.
I have not inserted the code because it is the standard code used for
export a slide as Jpeg that I found in the PPTools. FAQ section.

I use the .Export method where I can specify the slide height and width
in pixels but not the dot-per-inch resolution. Using PowerPoint
Application you can specify the resolution by a register but it doesn't
work with the .Export method.

I searched for a specific property for this task but I was not able to
find it

Have you any other suggestion?

Regards,
Mario
 
M

mario70xx

Steve said:
The needed bit should only be a few lines. Pop it in here so we can have a look
if you would. Thanks.
The code I used for the test
Set PPApp = CreateObject("PowerPoint.Application")
If PPApp Is Nothing Then Exit Sub

PPApp.Visible = True
Set PPpres = PPApp.Presentations.Open(sFile, True, , False)
If PPpres Is Nothing Then
PPApp.Quit
Exit Sub
End If

PPpres.Slides(SlideIndex).Export ImageFile, "jpg", ImageWidth,
ImageHeight

PPpres.close
PPApp.Quit
There's no specific property for DPI because it's rather meaningless.
How have you determined that it doesn't work?
If you're opening the images in an image editor and it's telling you 72dpi, that's
incorrect information, most probably.

If you're asking for an image that's, say, 2000 pixels wide, are you getting that
many pixels? If so, it's working as it should.
If you have a look at this article
http://support.microsoft.com/default.aspx?scid=kb;en-us;827745 you can
see that the maximum value is 307 dpi.
In any case, I checked the produced images with Adobe Photoshop and I
analyzed the JFIF file using a hex editor.

I found a work around that I don't like but it works: I change the dpi
resolution directly on the JFIF file.

I always searching for a solution using PPT activeX.

Regards,
Mario
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top