View Single Post
  #2  
Old May 22nd 07, 07:39 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Public Folder Notification

The Folder Assistant has some features that can forward you a copy of the new
item or send a different message altogether. It cannot do Desktop Alerts or
dialog pop-ups though. For the latter you need to use VBA. You'd have to
set a module level reference for an Items collection object using the With
Events keyword. You'd also need to know the folder path or EntryID value to
set a reference to a MAPIFolder object from which you'd obtain the Items
collection object.

Once you have an Items object declared as above, there's an ItemAdd event
you can trap to do something when a message arrives. Note that this event
may not fire if a lot of items are delivered/saved at the same time. A more
reliable but more difficult event to trap would be the Application.NewMailEx
event.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Jarryd" wrote:

Hi,

How do you set a public folder to display notifications when an item is
added to it? I particularly want to set this so certain Outlook clients
receive notifications for certain public folders. I don't want the items to
be forwarded to the users' mailboxes - I want a messagebox to be displayed.
If I have to do this with VBA (ThisOutlookSession) then cool. But what
event do you use, and what is the basic code that you would use to do this.

TIA,

Jarryd



Ads