Help!

Run a macro

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA RSS
Next:  IMAP Problems  
Author Message
Bre-x
External


Since: Jul 11, 2007
Posts: 3



PostPosted: Wed Jul 15, 2009 1:31 pm    Post subject: Run a macro
Archived from groups: microsoft>public>outlook>program_vba (more info?)

I would like to run a macro every time i receive a email
from an especific user

if Barack_Obama.TakeThisOut@gov.usa.org then
msgbox "You got Mail!"
else
'do nothing
end if

Can it be done?

Thank you all
Back to top
Sue Mosher [MVP]
External


Since: Mar 19, 2009
Posts: 41



PostPosted: Wed Jul 15, 2009 3:47 pm    Post subject: Re: Run a macro [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you restructure your macro to be a subroutine with a MailItem argument,
you can use the "run a script" rule approach or any of the event handlers
described at http://www.outlookcode.com/article.aspx?id=62

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bre-x" <cholotron RemoveThis @hotmail.com> wrote in message
news:e2JtTLYBKHA.1376@TK2MSFTNGP02.phx.gbl...
>I would like to run a macro every time i receive a email
> from an especific user
>
> if Barack_Obama RemoveThis @gov.usa.org then
> msgbox "You got Mail!"
> else
> 'do nothing
> end if
>
> Can it be done?
>
> Thank you all
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum