Notify on attachment content

  • Thread starter U3BhY2VDYW1lbA
  • Start date Views 1,376
Status
Not open for further replies.
U

U3BhY2VDYW1lbA

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,
 
K

Ken Slovak - [MVP - Outlook]

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.

"SpaceCamel" <SpaceCamel> wrote in message

news:EB09FDD5-ECF2-4002-9C61-0CA7E3793472@microsoft.com...
> 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,
 
U

U3BhY2VDYW1lbA

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,
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.

> >

>

> "SpaceCamel" <SpaceCamel> wrote in message
> news:EB09FDD5-ECF2-4002-9C61-0CA7E3793472@microsoft.com...
> >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,


>
 
Status
Not open for further replies.
Top