Exporting PPT presentation to JPG via DLL

T

TravisNewbury

Does anyone have sample VB code that will let a VB application take
advantage of the Power Point DLL's and export slides to JPG's?

I want a user of our applicaiton to be able to select a PPT file and
extract all the slide into JPGs. I understand that they have to have
Power Point on their system to have these DLLS, and that they can di it
direclty form Power Point, but I want to have them do it from our
application.

Thanks!
 
A

Abhishek

Heres a sample description of how to go about it
This code is in c# but i do not think it should be a problem converting this
to VBA
m_PPTApp = new PPTInterop.ApplicationClass(); (Declaring PPT Application
object)

m_PPTPresentation=m_PPTApp.Presentations.Open(m_PPTFilePath,Microsoft.Office
..Core.MsoTriState.msoTrue,Microsoft.Office.Core.MsoTriState.msoTrue,Microsof
t.Office.Core.MsoTriState.msoFalse); (Declaring PPT Presentation)

m_SlideCount =m_PPTPresentation.Slides.Count ;

for (int sCount = 1; sCount<=m_SlideCount;sCount++)

{

m_PPTSlide = m_PPTPresentation.Slides[sCount];

m_PPTSlide.Export("newfilename.jpg",
"jpg",(int)m_PPTPresentation.PageSetup.SlideWidth,(int)m_PPTPresentation.Pag
eSetup.SlideWidth );

}

This will export all ur slides to jpeg format

Abhishek
 
T

Travis

Abhishek said:
Heres a sample description of how to go about it...

Perfect! Thanks a lot, and the conversion to VB is as simple as you
thought.

Thanks a lot!
 

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