PDA

View Full Version : Reply-To Field Macro?



APConnextion
11-11-2004, 12:30 PM
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 (www@ac.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.

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

mark007
02-08-2005, 03:27 AM
Trying setting the From addess to also be the users email. This might sort you out.

:)