I'm trying to annotate an image and then fax it using the Kodak image controls and the MS Fax Extended COM.
Here is the code:
Here is the code:
Code:
Private Sub ImageWODeleteCode()
ImgEdit.Image = "C:\Scan\00015361.tif"
ImgEdit.Display
ImgEdit.SaveAs "C:\Scan\Test.tif"
ImgEdit.Image = "C:\Scan\Test.tif"
ImgEdit.Page = 2
ImgEdit.AnnotationFont = "Tahoma"
ImgEdit.AnnotationFontColor = vbRed
ImgEdit.AnnotationType = wiTextStamp
ImgEdit.AnnotationStampText = "Order# " & strOrdernum & vbNewLine & "Confirmed"
ImgEdit.Display
ImgEdit.Draw 1000, 50, 2, 2
ImgAdmin.Image = ImgEdit.Image
ImgAdmin.DeletePages 1, 1
ImgAdmin.DeletePages 3, 10
ImgEdit.Save
End Sub
Private Sub FaxImage(strFaxNo As String)
'Fax the image
Dim objFaxServer As FAXCOMEXLib.FaxServer
Dim objFaxDocument As FAXCOMEXLib.FaxDocument
Dim objFaxDevice As FAXCOMEXLib.FaxDevice
Dim jobid As Variant
Set objFaxServer = New FAXCOMEXLib.FaxServer
Set objFaxDocument = New FAXCOMEXLib.FaxDocument
objFaxServer.Connect "\\svr"
Set objFaxDevice = objFaxServer.GetDevices.Item(3)
objFaxDocument.Body = "C:\Scan\Test.tif"
objFaxDocument.Recipients.Add Fax #, "Test"
jobid = objFaxDocument.ConnectedSubmit(objFaxServer)
MsgBox "The jobid is " & jobid(0)
objFaxServer.Disconnect
Set objFaxServer = Nothing
Set objFaxDocument = Nothing
Set objFaxDevice = Nothing
End Sub
[\code]
Problem: Saving the tif file as another file (how the code is currently), annotating the faxed pages, deleting the pages, and then faxing the images, the images come out blank. However, if I first annotate the original images, delete the pages, and then save the file, the faxed pages come out correctly.
But the second option cannot be done as I cannot make any changes to the original file.