Outlook 2010, need script for rules & Warnings

Status
Not open for further replies.

SMT

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hello, we got macro's to enable /disable rules in Outlook 2010. What I need is a script that will start the macro if I reveive a mail with a certain subject from a certain sender.

Or if this is not possible to start the macro at a specific time each day.

( complete newbie in programming)

Thanks in advance,

Rob
 

SMT

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Okay I'm newbie off.

I changed some things in my macro, and now it is a script.

Thank you for the reply.

Best

rob
 

SMT

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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.

http://www.slipstick.com/outlook/rules/outlooks-rules-and-alerts-run-a-script/

http://support.microsoft.com/kb/306108
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.

Thanks,

Rob
script:

- 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

- Next

etcetera...
 
Status
Not open for further replies.
Top