vba code needed to add .snp object files to powerpoint

N

nimmis

I have a bunch of .snp files that need to be imported into powerpoint. I
have looked every where to find code to automatically add .snp objects into
powerpoint using VBA. Any assistance would be most appreciated.
 
N

nimmis

..snp files are snapshot files. Essentially, to bring these snap shot files
into ppt, you just insert object, create from file and import the file in.

I guess I am asking for VBA code to insert objects into PPT.
 
N

nimmis

Thanks for the reply

Steve Rindsberg said:
OK. Assuming the .SNP extension is registered to an app that's an OLE server,
you'd do something like this (after changing the names and places to something
more generically suited to your needs):

Sub AddObjectDuJour()

Dim sFilename As String

sFilename = "c:\temp\myfile.snp"

' add it to the first slide in the presentation
' add it in upper left corner, 2" square
With ActivePresentation.Slides(1).Shapes
.AddOLEObject 0, 0, 144, 144, , sFilename
End With

End Sub




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

nimmis

Thanks Steve. I tried your code and it works!!! Wonderful.

Now, I need to add additional objects to the same PPT file. How do you loop
and add addtional slides?
 

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