• Outlook VBA Trigger Events?

    Author
    Topic
    #505268

    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…

    Viewing 0 reply threads
    Author
    Replies
    • #1559923

      There is a list of Outlook events in the left column at https://msdn.microsoft.com/en-us/library/office/ff861266.aspx that may help.

      • #1560129

        There is a list of Outlook events in the left column at https://msdn.microsoft.com/en-us/library/office/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

    Viewing 0 reply threads
    Reply To: Outlook VBA Trigger Events?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: