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

Tags: ,

Reply macro...





 
 
Thread Tools Display Modes
  #1  
Old May 31st 06, 11:00 PM posted to microsoft.public.outlook.program_vba
fatchedecon@gmail.com
external usenet poster
 
Posts: 3
Default Reply macro...

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  
Old June 1st 06, 07:39 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Reply macro...

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  
Old June 1st 06, 04:31 PM posted to microsoft.public.outlook.program_vba
fatchedecon@gmail.com
external usenet poster
 
Posts: 3
Default Reply macro...

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  
Old June 2nd 06, 06:22 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Reply macro...

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  
Old June 2nd 06, 11:53 AM posted to microsoft.public.outlook.program_vba
fatchedecon@gmail.com
external usenet poster
 
Posts: 3
Default Reply macro...

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

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
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


All times are GMT +1. The time now is 03:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Adverse Credit Remortgage - Web Advertising - Halifax - Compare Mobile Phones - SEO Toronto