Thanks Alexey. I have tried adding an image using this code from your demo but have been unable to get it to work. You demo in a vb class. Is there a line or two of code you could provide that would just add an image to a ppt?
I have tried something like this in my .NET code (VB):
Dim fileName As String = MapPath(".") + "\\AsposeTest.ppt"
Dim pres As Presentation = New Presentation(fileName)
Dim slides As Slides = pres.Slides
Dim pholders As Placeholders = slides(0).Placeholders
Dim th As TextHolder = pholders.Item(0)
If th.Text = "Aspose Test" Then
th.Paragraphs(0).Portions(0).Text = "Hello World"
' Add new picture
Dim picid As Integer = pres.Pictures.Add(New Picture(pres, MapPath(".") + "\\47.jpg"))
' Assign new picture to the first slide background
pres.Slides(0).Background.FillFormat.PictureId = picid
Me.Response.ContentType = "application/vnd.ms-powerpoint"
Me.Response.AppendHeader("Content-Disposition", "attachment; filename=demoppt.ppt")
Dim st As System.IO.Stream = Me.Response.OutputStream
The "Hello World" appears in the placeholder but the image (47.jpg) is not added to the page. Can you tell what I might be missing?