Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Notify on attachment content (http://www.outlookbanter.com/outlook-vba/90801-notify-attachment-content.html)

SpaceCamel May 26th 09 05:43 AM

Notify on attachment content
 
I receive email with a word attachment every day. I am only interested when
the document contains certain words. Is there a way via VBA to automatically
open the doc, scan for the word and notify if present.
Thanks,

Ken Slovak - [MVP - Outlook] May 26th 09 03:53 PM

Notify on attachment content
 
You would need to save the attachment to the file system as a document file
and then open it and parse it using the Word object model.

When you manually open an attachment from Outlook that's exactly what
Outlook does. It saves the attachment in a temp folder and opens it based on
what program is registered in Windows to handle that file extension.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"SpaceCamel" wrote in message
...
I receive email with a word attachment every day. I am only interested
when
the document contains certain words. Is there a way via VBA to
automatically
open the doc, scan for the word and notify if present.
Thanks,



SpaceCamel May 30th 09 06:51 AM

Notify on attachment content
 
OK, Got it to work.

Rule moves msg to folder and start macro.
Macro saves attachment to folder, opens doc, scans for text
if finds text then it sends me another email

Thanks,

"Ken Slovak - [MVP - Outlook]" wrote:

You would need to save the attachment to the file system as a document file
and then open it and parse it using the Word object model.

When you manually open an attachment from Outlook that's exactly what
Outlook does. It saves the attachment in a temp folder and opens it based on
what program is registered in Windows to handle that file extension.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"SpaceCamel" wrote in message
...
I receive email with a word attachment every day. I am only interested
when
the document contains certain words. Is there a way via VBA to
automatically
open the doc, scan for the word and notify if present.
Thanks,





All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com