Code: Select all
Set Store = Application.Session.Stores("myAccount@gmail.com")
Set Rules = Store.GetRules
MsgBox Rules.count 'This returns the correct number of rules including the one based on "sent".
For Each RuleName In Rules 'Errors out here when I add a "sent" rule.
Debug.Print RuleName
Next RuleName