Microsoft Office Document Imaging Issue
I am writing a little program using the MODI (Microsoft Office Document Imaging) and trying to save some pictures created by the Microsoft Office Document Image Writer.
I manage to save a thumbnail of each page in the MDI file but not the full picture: "element not found" is raised when trying to reach the full picture's handle.
Here is the little code portion:
Dim myMODIDoc As New MODI.Document
Dim j As Integer
Dim myImage As Image
Dim myPicture1 As stdole.IPictureDisp
Dim myPicture2 As stdole.IPictureDisp
myMODIDoc.Create("c:\power.mdi")
For j = 0 To myMODIDoc.Images.Count - 1
Dim myMODIImage As MODI.IImage = myMODIDoc.Images.Item(j)
'save the Thumbnail: It works
myPicture1 = myMODIImage.Thumbnail
myImage = Image.FromHbitmap(New System.IntPtr(myPicture1.Handle))
myImage.Save("c:\imgThumbnail" & j & ".jpg")
'save the full image Thanks.
myPicture2 = myMODIImage.Picture
'FAILS!!!!!!!!!!! => element not found
myImage = Image.FromHbitmap(New System.IntPtr(myPicture2.Handle))
myImage.Save("c:\imgFull" & j & ".jpg")
NextIs there a workaround or a fix for this?
Stphane.

