Printing TIF & PDF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jinesh1986
    New Member
    • Oct 2008
    • 1

    Printing TIF & PDF

    Dear Bytians,

    Could any one help me on this?

    I have coded a pgm in Excel using VB which passes a search string to the outlook and search for the email containing that string in the subject line.

    What I want to do now?
    1. Print the attachments
    2. Save the attachments
    3. Move the email to a folder named "Actioned"

    My program works well for point 2&3 successfully but fails for point 1.
    Please note that majority of my attachments are tif & pdf. Hence could you please help me to identify the kind of attachment and print it accordingly?

    Thanks in Advance
    Jinesh
  • rpicilli
    New Member
    • Aug 2008
    • 77

    #2
    There is no easy way to complete your asked task.

    If you want your user could "see" and print the attachements use the Process command. This one will open up the application responsible by the file attached.

    Lets say your attached file is a PDF file, then the Acrobat Reader will open up the file and your user could print from there.

    Just put a Buttom on your form rename it to butOpenPDF and create a file called "Teste.pdf" and put it in the root of D drive. This is the code to open this file.

    [CODE]
    Private Sub butOpenPDF_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles butOpenPDF.Clic k
    Dim myProcess As New Process
    Process.Start(" d:\teste.pdf")
    End Sub
    /[CODE]

    Easy like that!!!

    I hope this help

    Rpicilli

    Comment

    Working...