Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Austin, TX USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outlook VBA Trigger Events?

    Yes, I do have a specific problem at the moment. But first, rather than post lots of questions, can anyone point me to a web page, article, or book that would bring me up to date on the Outlook specific programming items for VBA scripts? [Outlook 2016, preferably.] I can program just fine - but the system references to various Outlook objects and triggers/events seems to be what I am missing.

    For example, I want to add a script or rule that runs when I manually delete an email message. Yet, so far, I can't find the trigger event for this, or how to link the event to the script.

    I would sure rather find a manual that gives me this kind of information, rather than keep asking for help. Thanks...

  2. #2
    Star Lounger Graham Mayor's Avatar
    Join Date
    Mar 2016
    Location
    Cyprus
    Posts
    68
    Thanks
    0
    Thanked 24 Times in 24 Posts
    There is a list of Outlook events in the left column at https://msdn.microsoft.com/en-us/lib.../ff861266.aspx that may help.
    Graham Mayor - Word MVP
    http://www.gmayor.com

  3. #3
    New Lounger
    Join Date
    Dec 2009
    Location
    Austin, TX USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Graham Mayor View Post
    There is a list of Outlook events in the left column at https://msdn.microsoft.com/en-us/lib.../ff861266.aspx that may help.
    Thanks... That does, in fact, help a lot.

    I still seem to be missing a "step" in this - namely, how it "connects" functionally. Example: There is the "BeforeDelete Event" example you so kindly pointed out to me. [Doesn't do what I need, but that's no problem. I can modify it as necessary - **IF** I can get it to actually execute.] I am assuming that, like regular VB, the handler for the BeforeDelete Event (myItem_BeforeDelete) will just magically execute when I tell Outlook to delete a message that is currently selected.

    But the example explanation says that the sub DeleteMail must first be executed. [And indeed, this would appear to be the case.] But I don't see any way to set a rule to force this (unless I simply execute it EVERY time a new piece of mail arrives). I think I am missing something very basic in my understanding. Maybe I am missing some fundamental issue with various ways in which I can force these code segments to execute?

    Tnx... jmk

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •