Consulting

Results 1 to 2 of 2

Thread: Reply-To Field Macro?

  1. #1

    Reply-To Field Macro?

    Hi! I have a FrontPage form sending results back to my email (in Outlook). It is set to have the user enter their email address into a form field called Email, and then use that email address for the reply-to address from the email.

    When I manually click reply in Outlook it does just that. Puts the users email address in the To box. However, if I use auto-reply in Rules, it uses the www at ac dot com address it gets from the server (or just doesn't reply, depending) - the one that shows up in the Sender field when I receive the email.

    I also print the email and move it to another folder. I tried doing all of this with the rules, but it only prints and moves it to another folder.

    Can someone help me write a macro for Outlook that will auto-reply (using the reply-to field, not the sender field) to the messages with "Listing Changes" in the subject, print them, and move them to a different folder? I can't seem to figure it out myself . . .

    I found this, if it helps anyone with a solution. But I don't know how to utilize it.

    [VBA]Function GetReplyToAddress(objMsg)
    Set objReply = objMsg.Reply
    On Error Resume Next
    Set objRecip = objReply.Recipients.Item(1)
    If Err = 0 Then
    ' address will be in Name or Address depending
    ' on sending application and type of address
    strAddress = objRecip.Address
    If strAddress = "" Then
    strAddress = objRecip.Name
    End If
    ElseIf Err = 287 Then
    'handle possible security patch error
    strAddress = ""
    MsgBox "The Outlook E-mail Security Patch is " & _
    "apparently installed on this machine. " & _
    "You must response Yes to the prompt about " & _
    "accessing e-mail addresses if you want to " & _
    "get the Reply To address.", vbExclamation, _
    "GetReplyToAddress"
    End If
    GetReplyToAddress = strAddress

    Set objRecip = Nothing
    Set objReply = Nothing
    End Function[/VBA]

  2. #2
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    622
    Location
    Trying setting the From addess to also be the users email. This might sort you out.

    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

Posting Permissions

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