problem with ".AddPicture" method.

T

Trigger

Hi, I'm trying to insert a mix of .ppt slides and .jpg pictures into a
presentation and I was wondering if there is a way (using
VBscript/ASP) to insert pictures into powerpoint presentations without
having to insert a blank slide first?
I currently have:

fileExt = fso.GetExtensionName(infile(i))
If fileExt = "jpg" Then
Call newPres.Slides(i).Shapes.AddPicture(infile(i), _
False, True, 100, 100, 70, 70)

Else 'if its not a picture then it has to be a ppt file...
newPres.Slides.InsertFromFile (infile(i), i)
End If
i = i + 1
Loop Until i = numFiles

This simply inserts the picture into the last slide inserted into the
presentation.

Also, would anyone know why the ".AddPicture" method might not work
when called within an ASP file? It simply seems to skip the method,
however the ".InsertFromFile" DOES work. Any suggestions?
Thanx,

Tristan
 
K

Kurt

Hi Trigger, maybe you can use datapoint (http://www.take-off.as/datapoint).
It's powerpoint add-on that enables you to link your presentation to dynamic
information coming from text files, excel and databases, even images files.

You could use this addon if you have the filenames of your .jpg pictures in
a text file or database. Then you can use it to generate a new presentation
with a new slide for each jpg. Have a look at
http://www.take-off.as/datapoint/f_DisplayAnImageDynamically.htm.

Otherwise if you want to generate it yourself, I don't think you can do it
without inserting a blank slide first.

Regards

Kurt.
 
S

Steve Rindsberg

Hi, I'm trying to insert a mix of .ppt slides and .jpg pictures into a
presentation and I was wondering if there is a way (using
VBscript/ASP) to insert pictures into powerpoint presentations without
having to insert a blank slide first?

All visible "content" in PowerPoint has to be on a slide (or notespage or
whatever).
You can't have a picture on its own .... it has to be ON a page of some
sort.

Is that really the problem or is it a matter of not being able to get the
picture sized reasonably (ie, to fill the slide frame)?
 

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