Timer based macros are difficult because Outlook doesn't include a timer - definately not a newbie task. You can run macros when things happen -ie, on send, on delete etc. But in your case, you could use a rule that runs a script.
You might be able to convert an existing macro - if not, the script should be able to fire the macro.
Hi, I've still got one problem to solve. As I mentioned we got those macro's to dis- and enable rules and warnings. I now run them by script. Is there a possibilty to en- or disable only one rule.
Underneath is a part of the script...can you please point me in the right direction, need to now where to put the ""CurrentRule.Name"" so that the script will only disable that rule.
- Public Sub EnableAllRules(Item As Outlook.MailItem)
- Dim colRules As Outlook.rules
- Dim oRule As Outlook.Rule
- Dim count As Integer
- Dim ruleList As String
- Set colRules = Application.Session.DefaultStore.GetRules
- For Each oRule In colRules
- oRule.Enabled = True
- oRule.Execute ShowProgress:=True
- count = count + 1
- ruleList = ruleList & vbCrLf & count & ". " & oRule.Name