A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Run a macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 15th 09, 09:31 PM posted to microsoft.public.outlook.program_vba
Bre-x[_2_]
external usenet poster
 
Posts: 6
Default Run a macro

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

if then
msgbox "You got Mail!"
else
'do nothing
end if

Can it be done?

Thank you all


Ads
  #2  
Old July 15th 09, 09:47 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Run a macro

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" wrote in message
...
I would like to run a macro every time i receive a email
from an especific user

if then
msgbox "You got Mail!"
else
'do nothing
end if

Can it be done?

Thank you all



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set off VBA macro on email receipt then that macro accesses the emailcontent [email protected] Outlook and VBA 3 February 5th 09 01:14 AM
OL 2003 crashes on macro (Alt-F8) or macro editor (Alt-F11) mikewillnot Outlook - General Queries 0 May 5th 08 04:42 PM
Macro help Steve[_4_] Outlook - General Queries 0 November 7th 07 10:22 PM
Outlook macro abends but Word macro runs successfully Jreue Outlook and VBA 0 December 14th 06 12:55 AM
Call macro stored in Excel workbook from Outlook's macro Gvaram Outlook and VBA 5 October 4th 06 07:26 AM


All times are GMT +1. The time now is 08:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.