View Single Post
  #3  
Old April 3rd 07, 06:54 PM posted to microsoft.public.outlook.program_vba
Jens Sommer
external usenet poster
 
Posts: 2
Default Automated answer-template with "dyn." html

Hello,

I googled a lot and tried this and that. Now the facts:

1. My rule works. Every Mail with the "correct" subject is answered with an
template e-mail (*.oft)
2. I wrote some VBA code to get the TO-e-mail-adress into the body:
===
Sub Test()
Dim myOlApp As Outlook.Application
Dim myOlIns As Outlook.Inspector
Dim objMail As Outlook.MailItem

Set myOlApp = CreateObject("Outlook.Application")
Set myOlIns = myOlApp.ActiveInspector

Set objMail = myOlIns.CurrentItem
objMail.Body = objMail.Body & "http://www.my-server.com/test.htm&user="
& objMail.To

Set myOlApp = Nothing
Set myOlIns = Nothing
Set objMail = Nothing
End Sub
===
This also works and inserts the URL and the e-mail-address at the end of the
body.

So my last problem is now: Merge this two together: I need the rule to
create the answer mail and then execute the code... but how?

I hope for your Ideas!

Greetings
JS


Ads