A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Automated answer-template with "dyn." html



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 31st 07, 07:52 PM posted to microsoft.public.outlook.program_vba
Jens Sommer
external usenet poster
 
Posts: 2
Default Automated answer-template with "dyn." html

Hello,

we have a web form on our website where users can enter their e-mail address
in order to get a newsletter. The form sends an e-mail to us with the users
e-mail address in the from field and in the body.

I created a rule that automatically answers this mail with a template. The
mail-template contains a link to our website to confirm the e-mail address.

All this works fine. But now I want Outlook, a macro or may be the template
itself to add the e-mail address of the user (in the to-field of the reply)
to the links: Just like
http://webserver/newsletter-confirm....userdomain.com

Any Ideas how to do this??

Greetings
Florian


  #2  
Old April 2nd 07, 07:12 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Automated answer-template with "dyn." html


Probably I'd use a placeholder for the link. Read the templates HTMLBody
property, replace the placeholder by the link with the address and write it
back into HTMLBody.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)


Am Sat, 31 Mar 2007 19:52:25 +0200 schrieb Jens Sommer:

Hello,

we have a web form on our website where users can enter their e-mail

address
in order to get a newsletter. The form sends an e-mail to us with the

users
e-mail address in the from field and in the body.

I created a rule that automatically answers this mail with a template. The
mail-template contains a link to our website to confirm the e-mail

address.

All this works fine. But now I want Outlook, a macro or may be the

template
itself to add the e-mail address of the user (in the to-field of the

reply)
to the links: Just like
http://webserver/newsletter-confirm....userdomain.com

Any Ideas how to do this??

Greetings
Florian

  #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


  #4  
Old April 4th 07, 07:12 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Automated answer-template with "dyn." html



Jens, that doesn't work. You can create a rule to run a script. Then create
the e-mail and load the template yourself. You can load an *.oft file with
CreateItemFromTemplate.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Tue, 3 Apr 2007 18:54:13 +0200 schrieb Jens Sommer:

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook "freezes" on "reply" when I set Word as my HTML editor? louis11 Outlook - Installation 0 May 12th 06 05:43 PM
Outlook "freezes" on "reply" when I set Word as my HTML editor? louis11 Outlook - Installation 0 May 12th 06 05:40 PM
Is there an answer to why Outlook 2003 won't "send" email?` Tee Outlook - General Queries 0 April 23rd 06 09:25 PM
Cannot add Contacts get answer "one or more parameter not valid"?. Michele M. Outlook - Using Contacts 1 April 23rd 06 05:02 AM
OE mail template "new" and "replay" modify maziek Outlook - General Queries 2 April 18th 06 08:21 PM


All times are GMT +1. The time now is 08:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.