View Single Post
  #23  
Old March 12th 10, 02:33 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Create a macro in Outlook to run a rule

If you looked at locals when the code had finished they would all be Nothing
(null). What you want to do is to put the breakpoint on the line after
colRules is set.

You should then see valid objects for NameSpace, Store and Rules objects.
For example instead of Nothing you'd be able to expand the value and see
settings such as Name.

That tells you the base objects you need are all set. Then using F8 to step
the code one executable line at a time you can execute that line of code and
see what other variables are doing. Does the rule you want get found and
instantiated as oRule, etc.

--
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" wrote in message
...
I am sorry, I did not mean that you should debug it; I just don't know what
I
am doing. I went to 'help" and found out what the 'locals window" is. b/c
I
did not kow what it was.
I thought that I could copy /paste the result in this e-mail but I do not
see an avenue to do that.

So, I ran it w/o breaks and it just shows this but, this is probably not
helpful:

ONs nothing Name space
Ostore nothing store
colrules nothing rules
orule nothing rule

then when I put a breakpoint at the end of the set colrules o store linee,
it gives me a ton of lines, what should I look for? Most have "+" signs
and
I able to expand it

At least I understand now what you want me to do.


Ads