VB.NET Cree une miniature avec un slide PowerPoint

Dim pObjApplication As Object
Dim objDocWindow As Object
pObjApplication = GetObject("Powerpoint.Application")
pObjApplication.Activate()
objDocWindow = pObjApplication.Presentations.Open("C:\\pw.ppt")
objDocWindow.Slides(2).Export("C:\\export\slide.jpg", "jpg", 500, 500)
objDocWindow.Close()