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?
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" <Sim...@discussions.microsoft.com> wrote in message
news:83EE52F1-5C2F-4560...@microsoft.com...