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

Outlook 2k: running vba when new mail arrives



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 13th 06, 11:38 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook.program_vba
Brian Schwartz
external usenet poster
 
Posts: 2
Default Outlook 2k: running vba when new mail arrives

Hi all,

I'm using Outlook 2000 and need to run some VBA code when messages meeting
certain criteria arrive. I've tried using the Rules Wizard, but I can't find
an option to run a macro/script on the messages. I also noticed that the
ThisOutlookSession object includes an event for NewMail, but I have no idea
how to get started using it, since it includes no parameters and I'm not
familiar with the Outlook object model.

I have been programming in VB for some time, but Outlook is all new terrain
for me. I appreciate any pointers on how I might accomplish this goal.

Some additional details on what I need to do with the new messages: If it
has a certain subject line and the body contains a certain word, then I need
to:
- generate a unique, 20-character code (already have this)
- add a new record to a database with the code (know how to do this)
- get the new record's ID value (know how to do this)
- reply to the message and include the code (no idea how to do this)

Thanks!
Brian



Ads
 




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
Outlook 2k: running vba when new mail arrives Brian Schwartz Outlook and VBA 1 November 13th 06 11:54 PM
VBA Code not running until editor is open gamename Outlook and VBA 0 May 17th 06 06:42 PM
Outlook repeatedly asks for sign on as new mail arrives. [email protected] Outlook - General Queries 1 April 16th 06 12:00 PM
Problem running a VBA script from an Outlook rule Olivier Langlois Outlook and VBA 5 March 16th 06 10:03 PM
Problem running a VBA script from an Outlook rule Olivier Langlois Add-ins for Outlook 5 March 16th 06 10:03 PM


All times are GMT +1. The time now is 08:15 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.