Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Powerpoint API

Posted on 2003-03-10
4
Medium Priority
?
2,739 Views
Last Modified: 2012-08-13
I have a directory full of jpeg images.  I would like to write a small program that utilizes the Powerpoint API to create a new presentation and create a new slide with one image per slide.

Would anybody happen to have any example code they would like to share?

Thanks,
David
0
Comment
Question by:d_glenn
  • 2
4 Comments
 
LVL 55

Expert Comment

by:Ryan Chong
ID: 8109051
<Interesting! Listening..>
0
 
LVL 7

Accepted Solution

by:
Smallint earned 200 total points
ID: 8109677
Here's your example. Remember to add reference Microsoft Powerpoint.


Dim app As New PowerPoint.Application
Dim Presentation As PowerPoint.Presentation
Dim shape As PowerPoint.shape
Dim myDocument As PowerPoint.Slide

Set Presentation = app.Presentations.Add
Presentation.Slides.Add 1, ppLayoutBlank

Set myDocument = Presentation.Slides(1)
myDocument.Shapes.AddPicture "c:\Pic1.jpg", True, True, 100, 100, 70, 70

Presentation.Slides.Add 2, ppLayoutBlank
Set myDocument = Presentation.Slides(2)
myDocument.Shapes.AddPicture "c:\Pic2.jpg", True, True, 100, 100, 70, 70


Presentation.SaveAs "c:\MiFirstPPS.PPS"
Presentation.Close
app.Quit
Set app = Nothing

0
 
LVL 1

Author Comment

by:d_glenn
ID: 8114998
Thanks, I will give it a try when I get a few minutes.
0
 
LVL 1

Author Comment

by:d_glenn
ID: 8122848
Very cool!  Thanks a bunch!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question