Dim filePath As String = "C:\work\test.pptx"
Dim photoPath As String = "C:\work\test.jpg"
Dim positionLeft As Integer = 50
Dim positionTop As Integer = 50
Dim photoWidth As Integer = 100
Dim photoHeight As Integer = 100
Dim msoTriStateFalse As Microsoft.Office.Core.MsoTriState = Microsoft.Office.Core.MsoTriState.msoFalse
Dim msoTriStateTrue As Microsoft.Office.Core.MsoTriState = Microsoft.Office.Core.MsoTriState.msoTrue
Dim app As New Microsoft.Office.Interop.PowerPoint.Application
Try
Dim pres As Microsoft.Office.Interop.PowerPoint.Presentations = app.Presentations
Dim pptfile As Microsoft.Office.Interop.PowerPoint.Presentation = pres.Open(filePath, msoTriStateFalse, msoTriStateFalse,msoTriStateFalse)
Dim slide As Microsoft.Office.Interop.PowerPoint.Slide = pptfile.Slides(1) '// 1枚目
slide.Shapes.AddPicture(photoPath, msoTriStateFalse, msoTriStateTrue, positionLeft, positionTop, photoWidth, photoHeight)
pptfile.Save
pptfile.Close
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
app = Nothing
End Try