The macro should be in a code module.
So what happens? Do you get any errors or what? It might be necessary to
expand that one-liner so you can see where things are failing. Let's try
that:
Sub RunRuleDeleteSpam()
Dim oNS As Outlook.NameSpace
Dim oStore As Outlook.Store
Dim colRules As Outlook.Rules
Dim oRule as Outlook.Rule
Set oNS = Application.GetNameSpace("MAPI")
Set oStore = oNS.DefaultStore
Set colRules = oStore.Rules
Set oRule = colRules.Item("Delete Spam")
oRule.Execute
End Sub
Put your cursor in that macro in the VBA project and press F5. See what
happens when the macro executes, if you get any errors or what.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"DLGolfs" <(E-Mail Removed)> wrote in message
news:82B84BF2-6551-446D-BCBA-(E-Mail Removed)...
> ok, copy , pasted below into the editor module, run "macro" from VBA and
> outlook and nothing happens, sorry
>
> I put in in a module and a design module and neither work.