Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Control and Fax Server code help

Status
Not open for further replies.

rds747

Technical User
Mar 8, 2005
180
US
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:

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.
 
I'm thinking that in the code above during the process of saving the file some settings of the tiff file aren't transferred over. I tried comparing the two file settings through the properties window, but couldnt find any differences.

Is there a dos command that would give more detailed information?
 
Any suggestions?

Rather then trying the saveas method available in imgedit control I tried the copyfile method in VB, but couldnt get the images transmitting properly over the fax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top