Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 24th, 2004, 12:39 PM
NJOberheim NJOberheim is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 NJOberheim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Outlook Macro for kicking off a Batch file

Hi everyone,

Im trying to create a Macro in outlook that will scan incoming emails for a specific subject. Once said email is received, it kicks off a batch job. The problem im having is with recognising the email when it comes in. Here is my code. Any suggestions? am i going about this totally wrong?

Public Sub Application_NewMail()
Dim currentnamespace As NameSpace
Dim v_shell_return As Integer
Dim currentmapifolder As MAPIFolder
Dim currentmailitem As MailItem
Set currentnamespace = Application.GetNamespace("MAPI")
Set currentmapifolder = currentnamespace.GetDefaultFolder(olFolderInbox)
Set currentmailitem = currentmapifolder.Items(currentmapifolder.Items.Co unt)

If currentmailitem.Subject Like "RICHARD" Then
v_shell_return = Shell("C:\test3.bat")

End If
End Sub

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Outlook Macro for kicking off a Batch file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT