Hi All,
I'd like to code an outlook VBA macro that allows me to save .tif mail attachments in .pdf Since no such Outlook option exists, I first save the .tif as it is and then I am launching "Windows Photo Viewer" to open it, then I choose the Print option and select the "Microsoft to PDF" printer in the printers list.
This way, I can even split a multi-page .tif into single-page pdf's (very important for what I need to do).
What I have tried:
I am trying to use:
Public Function StartDoc(attachmntPath)
Dim Shex as object
Set Shex = CreateObject("Shell.Application")
Shex.ShellExecute attachmntPath, "", "", "print"
End function
ShellExecute opens the .tif using the application that I choose to associate with the file extension .tif
'Print as a verb allows me to skip the first screen of "Windows Photo Viewer" and brings me directly to the "Print Pictures" screen from where I can select the "Microsoft to PDF" printer and specify the page range if needed.
Is there a way to pause the macro in order to wait for when the user clicks on the PRINT button located on the "Print Picture" screen ?
Please note that I managed to use API's to find the "Print Pictures" window's handle as well as the "PRINT" button's handle.
Last thing, If someone knows an alternative way to get to the same results in Outlook directly, this will be equally highly appreciated.
Thanks a lot in advance