PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Can this be done in Outlook?
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Can this be done in Outlook?
![]() |
Can this be done in Outlook? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

