![]() |
| 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. |
|
|||||||
| Tags: macro, reply |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello everybody,
I need some help with VBA in Outlook 2003. I need a macro to do the following : When a message is selected: the macro open a new message replying to the original sender, add a recipient in copy ), displaying a custom body text : "Hello, we've received you message." and add the original message in attachment. Thank you for your help... |
| Ads |
|
#2
|
|||
|
|||
|
Am 31 May 2006 14:00:43 -0700 schrieb :
You could try something like this. Please note that it is subject to security issues. Public Sub Sample() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply Reply.Recipients.Add " Reply.Recipients.ResolveAll Reply.Attachments.Add Original Reply.Body = "Some text" Reply.Display End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hello everybody, I need some help with VBA in Outlook 2003. I need a macro to do the following : When a message is selected: the macro open a new message replying to the original sender, add a recipient in copy ), displaying a custom body text : "Hello, we've received you message." and add the original message in attachment. Thank you for your help... |
|
#3
|
|||
|
|||
|
great... it works !
Can you give me a last tip : is it possible to add the recipient " in copy (not recipient) of the message ? thanks for your help... ![]() Michael Bauer a écrit : Am 31 May 2006 14:00:43 -0700 schrieb : You could try something like this. Please note that it is subject to security issues. Public Sub Sample() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply Reply.Recipients.Add " Reply.Recipients.ResolveAll Reply.Attachments.Add Original Reply.Body = "Some text" Reply.Display End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hello everybody, I need some help with VBA in Outlook 2003. I need a macro to do the following : When a message is selected: the macro open a new message replying to the original sender, add a recipient in copy ), displaying a custom body text : "Hello, we've received you message." and add the original message in attachment. Thank you for your help... |
|
#4
|
|||
|
|||
|
Am 1 Jun 2006 07:31:31 -0700 schrieb :
Do you mean CC? The Recipients.Add returns a Recipient object. Please use that and set its Type property =olCC. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- great... it works ! Can you give me a last tip : is it possible to add the recipient " in copy (not recipient) of the message ? thanks for your help... ![]() Michael Bauer a écrit : Am 31 May 2006 14:00:43 -0700 schrieb : You could try something like this. Please note that it is subject to security issues. Public Sub Sample() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply Reply.Recipients.Add " Reply.Recipients.ResolveAll Reply.Attachments.Add Original Reply.Body = "Some text" Reply.Display End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hello everybody, I need some help with VBA in Outlook 2003. I need a macro to do the following : When a message is selected: the macro open a new message replying to the original sender, add a recipient in copy ), displaying a custom body text : "Hello, we've received you message." and add the original message in attachment. Thank you for your help... |
|
#5
|
|||
|
|||
|
Thanks a lot...
i've just modified the code : Public Sub Reply_Withcc() Dim Reply As Outlook.MailItem Dim Original As Outlook.MailItem Set Original = Application.ActiveExplorer.Selection(1) Set Reply = Original.Reply With Reply Set MyCC = ") MyCC.Type = olCC Reply.Recipients.ResolveAll Reply.Attachments.Add Original Reply.Body = "Your demand is in progress..." Reply.Display End With End Sub It works great... Thanks ![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| macro security | Charlie | Outlook and VBA | 2 | August 10th 06 01:46 AM |
| Outlook 2003 does not reply with original reply headers indented | Sriram | Outlook - General Queries | 0 | May 17th 06 05:46 PM |
| Outlook 2002 "reply" and reply all with original attach ????? | bma19 | Outlook - Installation | 1 | April 7th 06 09:41 PM |
| why cant I reply to certain recipients by reply or forwarding | kjmac308 | Outlook - General Queries | 2 | February 17th 06 07:45 PM |
| This group, reply vs no reply | KathrynBassett | Outlook - Using Contacts | 5 | January 30th 06 12:51 AM |