Results 1 to 3 of 3

Thread: Outlook Object model

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    451
    Location
    1. errors if there are no rules

    2. doesn't like RuleActions "Object doesn't support this property or method." My understanding of this property is that it is a collection of available rule actions. The entire collection is associated with each rule. Each action will be flagged as enabled if it is set as such for specific rule. I expect will have to enumerate the collection and output its identifier and enabled status. Something like:
    Dim olRules As Outlook.Rules, olRule As Outlook.Rule, olR As Outlook.RuleActions, olA As RuleAction
    Set olRules = Application.Session.DefaultStore.GetRules
    For Each olRule In olRules
        Set olR = olRule.Actions
        For Each olA In olR
            Debug.Print olRule.Name, olA.ActionType, olA.Enabled
        Next
    Next
    See docs for ActionType constants https://learn.microsoft.com/en-us/of...ruleactiontype
    Last edited by June7; 08-31-2024 at 10:37 AM.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Posting Permissions

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