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

Rule: "Reply using a specific template" doesn't reply to Reply-To:



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 18th 07, 05:38 AM posted to microsoft.public.outlook.program_vba
mhgreene
external usenet poster
 
Posts: 5
Default Rule: "Reply using a specific template" doesn't reply to Reply-To:

I posted this in the General Questions area and based on the response that I
would need a script thought this might be the more appropiate newgroup area.

I am currently using Outlook 2003 and Windows Pro XP.

I created a rule with the action "Reply using a specific template". The
rule functions correctly EXCEPT the response email, using the template I
created, is sent to the wrong address.

I examined the Internet Headers in the incoming message and see that the
From: & Reply-To: fields have different email addresses. I want the
"Reply using a specfic template" action to send the reply to the Reply-To:
address contained in the header, instead the action sends the email to the
From: address.

If I manually open the incoming email and click "Reply" on the menu bar, the
new message created has the correct Reply-To: adrress entered into the To:
field of the new message.

I was advised that this is the way Outlook works and I would need a script
to accomplish the desired result.

Is it possible to write a script to to be used in a rule that could
accomplish this? I am upgrading to Office 2007 and ordered the book
"Microsoft Outlook 2007 Programming" by Sue Mosher. My programming skills
are basic - any direction would be appreciated.
Thanks!
Ads
  #2  
Old August 20th 07, 03:54 AM posted to microsoft.public.outlook.program_vba
D.Lee
external usenet poster
 
Posts: 10
Default Rule: "Reply using a specific template" doesn't reply to Reply-To:

Yes, that's possible. I'll get the code and some instructions together and
post them as quick as I can (sometime tomorrow).
--
David Lee - MVP Outlook


"mhgreene" wrote:

Is it possible to write a script to to be used in a rule that could
accomplish this?

  #3  
Old August 21st 07, 03:34 AM posted to microsoft.public.outlook.program_vba
D.Lee
external usenet poster
 
Posts: 10
Default Rule: "Reply using a specific template" doesn't reply to Reply-To:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is going
to trigger Outlook's built-in security. That means a pop-up dialog-box each
time it fires. Outlook security can't be turned off, but there are several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!
  #4  
Old August 22nd 07, 04:16 AM posted to microsoft.public.outlook.program_vba
mhgreene
external usenet poster
 
Posts: 5
Default Rule: "Reply using a specific template" doesn't reply to Reply

I think I missed something!

Clicking Tools - Macro - Macros shows the SaturnFirstResponse named macro
in the dialog box when the Module1 code is as shown below. When I change the
Sub to read "Sub SaturnFirstResponse(Item as Outlook.MailItem), the named
macro disappears from the dialog box.

Sub SaturnFirstResponse()
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate = Application.CreateItemFromTemplate("C:\Documents and
Settings\greenemi.HARRISAUTO\application
data\Microsoft\Templates\OneSourceSalesSaturnFirst Response.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing

End Sub


"D.Lee" wrote:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is going
to trigger Outlook's built-in security. That means a pop-up dialog-box each
time it fires. Outlook security can't be turned off, but there are several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!

  #5  
Old August 23rd 07, 10:52 PM posted to microsoft.public.outlook.program_vba
mhgreene
external usenet poster
 
Posts: 5
Default Rule: "Reply using a specific template" doesn't reply to Reply

Please disregard my post dated 8/21/2007. I was able to work through my
misunderstanding of using the code you wrote.

The script does the job perfectly. A million thanks!

Mike


"D.Lee" wrote:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is going
to trigger Outlook's built-in security. That means a pop-up dialog-box each
time it fires. Outlook security can't be turned off, but there are several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!

  #6  
Old March 24th 08, 02:57 AM posted to microsoft.public.outlook.program_vba
Erik
external usenet poster
 
Posts: 13
Default Rule: "Reply using a specific template" doesn't reply to Reply

Thank you both for doing this. I have been searching and posting for 2 days -
Used D. Lee's script in Outlook 2000 and it worked perfectly!!

Now I am off to see how Outlook redemption can work around the security.

Thanks again - Erik

"mhgreene" wrote:

I think I missed something!

Clicking Tools - Macro - Macros shows the SaturnFirstResponse named macro
in the dialog box when the Module1 code is as shown below. When I change the
Sub to read "Sub SaturnFirstResponse(Item as Outlook.MailItem), the named
macro disappears from the dialog box.

Sub SaturnFirstResponse()
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate = Application.CreateItemFromTemplate("C:\Documents and
Settings\greenemi.HARRISAUTO\application
data\Microsoft\Templates\OneSourceSalesSaturnFirst Response.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing

End Sub


"D.Lee" wrote:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is going
to trigger Outlook's built-in security. That means a pop-up dialog-box each
time it fires. Outlook security can't be turned off, but there are several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!

  #7  
Old March 24th 08, 03:14 AM posted to microsoft.public.outlook.program_vba
Erik
external usenet poster
 
Posts: 13
Default Rule: "Reply using a specific template" doesn't reply to Reply

OK - - I posted the thank you but now I have a question about Outlook
Redemption. I am a little lost. With Outlook Redemtion installed, what code
would I add to the code you already submitted (which worked perfectly!) in
VB to bypass the security pop-up dialogue box?

Any help would be greatly appreciated (I looked at the FAQ in outlook
redemption and was a little confused to say the least)

Thank you again for your original post - Erik

"D.Lee" wrote:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is going
to trigger Outlook's built-in security. That means a pop-up dialog-box each
time it fires. Outlook security can't be turned off, but there are several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!

  #8  
Old March 28th 08, 09:59 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Rule: "Reply using a specific template" doesn't reply to Reply

Take a look at this sample. Every property/method you access with the
redemptionMailItem object will bypass any security prompts.

dim redemptionMail, outlookMail
set outlookMail= Application.CreateItem(olMailItem)
set redemptionMail = CreateObject("Redemption.SafeMailItem")
redemptionMailItem = outlookMail 'never use "Set" when setting the Item
property

--
Eric Legault - MVP - Outlook
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, WSS 3
Application Development, MOSS 2007 Application Development)
Blog: http://blogs.officezealot.com/legault
Try Picture Attachments Wizard for Outlook!
http://www.collaborativeinnovations.ca


"Erik" wrote in message
...
OK - - I posted the thank you but now I have a question about Outlook
Redemption. I am a little lost. With Outlook Redemtion installed, what
code
would I add to the code you already submitted (which worked perfectly!)
in
VB to bypass the security pop-up dialogue box?

Any help would be greatly appreciated (I looked at the FAQ in outlook
redemption and was a little confused to say the least)

Thank you again for your original post - Erik

"D.Lee" wrote:

This should do it. Follow these instructions to set this up.

1. Start Outlook.
2. Click Tools-Macro-Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Edit the code as needed. I placed comment lines where things need to
change.
6. Click the diskette icon on the toolbar to save the changes.
7. Close the VB Editor.
8. Click Tools-Macro-Security.
9. Change the Security Level setting to Medium.
10. Create a rule that runs when a new message arrives. Set the rule to
run the macro.

Becuase this code accesses an address field and sends directly it is
going
to trigger Outlook's built-in security. That means a pop-up dialog-box
each
time it fires. Outlook security can't be turned off, but there are
several
ways to work around this. The best solution is to use Outlook Redemption
(http://www.dimastr.com).

Sub ReplyWithTemplate(Item As Outlook.MailItem)
Dim olkReply As Outlook.MailItem, _
olkTemplate As Outlook.MailItem
Set olkReply = Item.Reply
'Change the template name and path on the following line
Set olkTemplate =
Application.CreateItemFromTemplate("C:\eeTesting\S ample Reply
Template.oft")
olkTemplate.Recipients.Add olkReply.Recipients.Item(1).Address
olkTemplate.Recipients.ResolveAll
olkTemplate.Send
Set olkReply = Nothing
Set olkTemplate = Nothing
End Sub

--
David Lee - MVP Outlook
!


 




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
why is "reply" tab always in Grey? can't click on "reply" to email onepoint Outlook - General Queries 3 September 14th 06 04:38 AM
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
Outlook 2002 "reply" and reply all with original attach ????? bma19 Outlook - Installation 1 April 7th 06 09:41 PM
Change "Reply To" Rule [email protected] Outlook and VBA 0 March 1st 06 10:47 AM


All times are GMT +1. The time now is 09:05 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.