Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    174
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rule Wizard and Macro (Outlook 2000)

    Is it possible to link Rule Wizard to a Macro, so that every time I receive a message from a particular person, the macro would delete the first two lines of the message body and add two new lines of text in the message body, retrieve a list of other recipients and forward the new message to the list. If it is possible, could someone help me with the VBA code ? I've never done macro with Outlook. THANKS !

  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 Wizard and Macro (Outlook 2000)

    It could be done via VBA, but the hard part is with your specification "delete the first two lines of the message body". Through Outlook 2002, message body is a single object, and can't be broken down further within Outlook. There are two ways around this:

    If the first two lines are always the same text, they can be removed by hard coding removal of the text in a VBA string instruction. Adding an initial piece of text is easy as msg.Body = mytext +msg.Body (except some hijinks may be needed if it's in HTML). One annoyance with this approach is that any fancy HTML or RTF formatting will disappear, defaulted to your default font and color.

    The more complex way is to instantiate Word and perform the operations there. I don't know Word, so someone else would have to help you there.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rule Wizard and Macro (Outlook 2000)

    Outlook 2000 did not allow you to write your own rule actions in VBA, but Outlook 2002 does. There might be an add-in available to bridge that gap, but I haven't gone hunting for one.

  4. #4
    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 Wizard and Macro (Outlook 2000)

    Don't Custom Rules have to be written in C++? (Which is outta my league.) Or am I missing something?
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rule Wizard and Macro (Outlook 2000)

    I guess I made it more confusing rather than clearer. How about a picture? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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