Adding Picture to Powerpoint via vb.net

Hello @Kuki_Force ,

Please try this:

Public Sub AddImageToPage(doc As PPTXDocument, logoPath As [String], x As Single, y As Single)
	Dim img As New REImage(logoPath)
	For i As Integer = 0 To doc.GetPageCount() - 1
		Dim tmp As PPTXPage = DirectCast(doc.GetPage(i), PPTXPage)
		' Add REImage to the PPTXPage and embed it in the form of Jpeg.
		tmp.AddImage(img, x, y, PPTUnits.[Default], ImageFormat.Jpeg)
	Next
End Sub

Source: http://www.rasteredge.com/how-to/vb-net-imaging/powerpoint-add-image/

Hope it helps!
Best regards,
Marius

1 Like