Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2004
    Thanked 0 Times in 0 Posts

    Macro help for automation (Outlook 2000)

    Looking to Automate a manual process . . . I currently have numerous emails sent to me which have a link of a different email address (different email address than the source of the email). For each email, I must click the link that will launch my email. I have set my signature to include the body of my email. However, for every email, I must paste the subject (control-V), followed by an Alt-S (to send the email) and then a Control-D (to delete the email that I just viewed). After deleting each email, I repeat the process with the next email.

    With all this said, I'm looking to simplify this process. For example, is there a way to include a default subject line each time I click on an email email? Of course, I would still want to include my signature as the body of the email.

    better yet, is there a simple macro I could launch after I click on each email link? I would envision a macro that could be ran at the click of a button that would populate the Subject line with a defaul Subject, then send the email and delete the current email just viewed.

    I hope this makes sense and I appreciate any help you may be able to provide.

    Danny Marshall

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Macro help for automation (Outlook 2000)

    You're not the guy who sends the reply saying "we will respond to your question shortly" -- and then deletes the question. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    Sorry, I couldn't resist. There are two steps in your description that pose an issue. The first is actually sending, which may invoke a security warning and 5 second delay. It would be easier to press Alt+S than to wait for that. The second is to delete the message that was the source of the link. I suppose it's reasonable to delete whatever message is selected in the active folder, but if you can think of a scenario where that would be wrong, perhaps it's easier to hit the Del key.

    Do these messages have a standardized format where it is would be easy for a computer to find the address you need to send to? If so, you could have the computer do pretty much everything. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> Although I guess clicking isn't so bad.

    Anyway, here's some sample code:
    <pre>Sub CompleteAndSend()
    ' Create a reference to the open message
    Dim msg As Outlook.MailItem
    Set msg = ActiveInspector.CurrentItem
    ' Set the subject line and send the message
    With msg
    .Subject = "Thank you for your subscription!"
    End With
    If Not (msg Is Nothing) Then Set msg = Nothing
    ' Delete the selected message in the active folder
    With ActiveExplorer.Selection
    If .Count = 1 Then
    ' What to do if multiple messages are selected?
    End If
    End With
    End Sub</pre>

    If you use the Redemption library, you can avoid the security prompt, but the code's a bit more complicated. Hope this helps.

    Added: I just re-read your message and realized that the original message, while it might get deleted my way, still will be on the screen. No time to work on this further tonight, but that should be manageable, too.

Posting Permissions

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