Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rule on toolbar? (2000 SR1)

    Does anyone know of anyway I can set a toolbar button that will allow for quick turning on and off of a particular rule? I feel this should be do-able, maybe with macro code or something, but it's beyond me! Any help would be gratefully appreciated.

    Thanks!

    Chris

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Rule on toolbar? (2000 SR1)

    Everything I have read indicates that Rules are not part of the OL Object Model, and therefore Rules cannot be accessed via code. I would love to be wrong (and so would a lot of incompletely answered posts in this Forum)! What you can do is rewrite the rule equivalent in VBA and run that from your TB button. What kind of Rule?
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Location
    England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rule on toolbar? (2000 SR1)

    I figured this may be the case as my digging into the language reference didn't turn up any references to Rules in code!

    What I'm trying to do is essentially set up an Out of Office Rule. However, I don't want to use the Out of Office assistant, since this always returns a return to the sender, even if you leave the reply field blank. I essentially wanted to set up a rule to forward (re-direct) e-mail to an external account, so it is turned on when leaving the office, and back off when returning back.

    Chris

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rule on toolbar? (2000 SR1)

    Microsoft has an example of creating a rule in code - it is written in C++, however, and it is far beyond my scope. You can find it at: HOW TO: Create an Out-Of-Office Rule with Extended MAPI.

    You may also be able to find information about programming rules on http://www.slipstick.com and/or http://www.cdolive.com. I haven't checked for rules specifically, but both sites have loads of information about Outlook/Exchange for developers.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rule on toolbar? (2000 SR1)

    I agree it's annoying. The standard Outlook object model doesn't expose much more than the bare minimum needed to create and process folders and items (appointments, mail messages etc.) in code. The CDO library exposes more, but still, it's a far cry from the Word object model that enables a programmer to control almost every aspect of Word (ditto for Excel and Access).

    BTW Did you look at the developer section of www.slipstick.com or just the general section?

  6. #6
    New Lounger
    Join Date
    Oct 2002
    Location
    England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rule on toolbar? (2000 SR1)

    Hmmm, chance to play with my (very limited!) C skills again - fun!

    Thanks for that, that Knowledgebase article does look interesting, if a bit heavy going. I've heard of slipstick before, and I know it gets lots of good press, but, maybe I'm missing something, it always seems that info is very thin on the ground there? Not heard of that other site though, so I'll check it out.

    It shouldn't be this hard should it! Why can't they include rules in the object model. arrrrgh! Even more simple than that, why cant you set an Out of Office without a reply - it's plain daft!

    Thanks for your help! - any other ideas greatfully received before I fall into the deep dark world of C!

  7. #7
    New Lounger
    Join Date
    Oct 2002
    Location
    England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rule on toolbar? (2000 SR1)

    Umm, to be honest I can't remember if I've seen the developer section of the slipstick site. I'm not knocking it's useful-ness, it just seems to me one of those niche sites that has quite a few specific things, rather than general advice.

    Thanks for recommending it though.
    Chris

    OK, I've had a little play with the slipstick site, and I think I see it's key is on it's linkiness - there's tons of links to other stuff, so I guess slipstick is a good jumping off point, and it's already diverted my mind to other things to play with!

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Rule on toolbar? (2000 SR1)

    From just my user perspective there are many little things that bug me about OL which I would like to modify by code, which is why I too find the OL Object Model frustrating in it's lack of exposure, and also it's somewhat arcane way of addressing the objects that are exposed (such as the need to instance a MAPI NameSpace to get at a Folder), but I'm very amateur coder.

    A client side Rule-equivalent such as you describe should be possible in VBA without delving into C; in Corporate/Workgroup mode it will only work when the client OL application is running, which is a bit useless when you are out of the office, and I don't know if it will work if you are using other than Exchange as your message server (definitely out my depth there). There are also inconsistencies in the way the Application_NewMail() event fires, but that should be manageable.

    (I'm constantly dredging the Outlook and VBA forums in learning mode about coding OL; I also bought Sue Mosher's book, and I'm disappointed in it from the perspective that the OL model is so limited I didn't get out of it what -I-wanted.)
    -John ... I float in liquid gardens
    UTC -7ąDS

  9. #9
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Rule on toolbar? (2000 SR1)

    John,
    I'm not sure how much help this will be to most people, but there is a sample project included in the Exchange Server 5.5 SDK that will allow you to build a Rules COM dll so you can then create and manipulate rules in code. Of course, you need the SDK and VC++ to build it.....
    FWIW.
    Regards,
    Rory

    Microsoft MVP - Excel

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Rule on toolbar? (2000 SR1)

    If I had some bacon, I could have bacon and eggs, if I had some eggs. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    -John ... I float in liquid gardens
    UTC -7ąDS

  11. #11
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Rule on toolbar? (2000 SR1)

    <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>
    If it's any consolation, I've got the SDK and Visual Studio and I still can't get the project to compile! <img src=/S/doh.gif border=0 alt=doh width=15 height=15> And I haven't got far enough with C++ to know why.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •