locked
grab microsoft Word Document from email and convert to pdf on the fly RRS feed

  • Question

  • Hello Experts,

    I am wondering if it is possible to write a program that will check my email for attached word documents and convert to pdf and send them back to sender on the fly?

    Note: I am aware that Foxypreviewer is capable of converting the document and sending it out via email

    Tuesday, May 28, 2013 5:14 PM

Answers

  • I don't know of any examples offhand, but the key thing you need to know is that each message has an Attachments collection. So to see whether there are attachments, you check Attachments.Count for that message.

    If you have my Automation book, take a look at Chapter 12 for examples of automating Outlook.

    This article on my site shows a little Outlook automation, as well: http://www.tomorrowssolutionsllc.com/Articles/Identify%20Outlook%20Objects.PDF

    Tamar

    • Marked as answer by mikelvfp Tuesday, May 28, 2013 8:11 PM
    Tuesday, May 28, 2013 8:03 PM
    Answerer

All replies

  • Depends on the email. Assuming you're using Outlook, you can certainly spin through the Inbox checking for attachments. I'm pretty sure you can then detect the file type, and if a document is found, open it in Word.

    The convert to PDF depends on what tools you have available for the job. If you have Word 2010 or later (maybe 2007, too), you can just Save As PDF, which you can do by Automation.

    Bottom line: yes, if you have the right tools, you can do this.

    Tamar

    Tuesday, May 28, 2013 7:52 PM
    Answerer
  • Thank you Tamar,

    this is great, yes I am using outlook, do you know of any examples that check the inbox for attachements?

    Tuesday, May 28, 2013 7:57 PM
  • I don't know of any examples offhand, but the key thing you need to know is that each message has an Attachments collection. So to see whether there are attachments, you check Attachments.Count for that message.

    If you have my Automation book, take a look at Chapter 12 for examples of automating Outlook.

    This article on my site shows a little Outlook automation, as well: http://www.tomorrowssolutionsllc.com/Articles/Identify%20Outlook%20Objects.PDF

    Tamar

    • Marked as answer by mikelvfp Tuesday, May 28, 2013 8:11 PM
    Tuesday, May 28, 2013 8:03 PM
    Answerer
  • Wow, this is Awesome, thank you Tamar, ill be sure to buy your book today.

    Tuesday, May 28, 2013 8:11 PM