PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Can this be done in Outlook?

Reply

Can this be done in Outlook?

 
Thread Tools Rate Thread
Old 05-11-2004, 03:55 AM   #1
=?Utf-8?B?U2ltZW9u?=
Guest
 
Posts: n/a
Default Can this be done in Outlook?


This is what I'm trying to do.

I would like for outlook to check all incoming mail containing a certain
word in the subject. (That's the easy part)

But this word needs to trigger a batch file to run a few commands that will
include another word from the emails subject. Once the batch file completes
its process, a .txt file is created. This .txt file needs to be attached to
the original mail then forwarded to certain email accounts.

I hope this makes sense. Can anyone help?
  Reply With Quote
Old 05-11-2004, 07:28 AM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: Can this be done in Outlook?

Hi Simeon,

for which part do you need help?

- Maybe you can move all mails with the certain word by a rule to
another folder.
- A good point to check incoming mails is the ItemAdd event of the
Folder.Items.
- The InStr-function helps you extracting additional words from the mail
subject.
- Normally your VBA code goes on after starting the batch file. Here I
just found a sample (not tested by myself) that forces your code waiting
for the end of the batch job:
http://www.freevbcode.com/ShowCode.asp?ID=3441
- Attaching a file, look for: MailItem.Attachments.Add
- Forwarding: set ForwardItem=MailItem.Forward


--
Viele Grüße
Michael Bauer


"Simeon" <Simeon@discussions.microsoft.com> wrote in message
news:83EE52F1-5C2F-4560-A3B1-67FBFC90D2AD@microsoft.com...
> This is what I'm trying to do.
>
> I would like for outlook to check all incoming mail containing a

certain
> word in the subject. (That's the easy part)
>
> But this word needs to trigger a batch file to run a few commands that

will
> include another word from the emails subject. Once the batch file

completes
> its process, a .txt file is created. This .txt file needs to be

attached to
> the original mail then forwarded to certain email accounts.
>
> I hope this makes sense. Can anyone help?


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off