Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Attribution (2000)

    Hi everyone!

    At home I use Virtual Access as my email client.
    VA has a feature I became to like: Automatic Attribution (as VA calls it).

    When one clicks reply to a message, VA automatically inserts
    "Hi Firstname,

    "

    At the top of the message (which is configurable as well).

    How would I get this into OL2000?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  2. #2
    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: Auto Attribution (2000)

    Do you want the long answer or the really long answer? <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    I wrote some code that would react to the event of creating a new "Inspector." If the Inspector was a Reply or Forward, a set of procedures run to show userforms and customize the message (e.g., insert confidentiality notices, set receipt requests, add a BCC). It works most of the time; sometimes the footer ends up in the Subject or something bizarre like that.

    Since I loaded the Outlook security patch, my macro needs permission to add the BCC. Very annoying, but so far not quite annoying enough to recode it with Outlook Redemption.

    Anyway, apart from the security issue with reading the "address book entry" on the To line, there are two methods to add text to the body. The first is to rewrite the body:

    myMailItem.Body = strNewText & myMailItem.Body

    When you do this to a plain text message, it changes to RTF. (There is a separate .HTMLBody; I haven't worked with that.)

    What I ended up doing was "typing" in the text using SendKeys. It's slow, and you have to be a bit careful about positioning the insertion point in the right place; for a forward, I do this:

    <pre>SendKeys "%j", True 'reposition in subject line
    SendKeys "{TAB}", True 'tab into body</pre>

    Maybe there's an easier way??

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Attribution (2000)

    Your sendkeys triggered me to the simplest (kludgy) solution:

    Option Explicit

    Sub PlaceAttr()
    SendKeys "+{tab 4}"
    SendKeys "^+{right}^c"
    SendKeys "{tab 4}"
    SendKeys "Hi ^v,~~"
    End Sub

    Sub Reply()
    SendKeys "%r"
    PlaceAttr
    End Sub
    Sub ReplyAll()
    SendKeys "%l"
    PlaceAttr
    End Sub

    Works a treat, thanks.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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