![]() |
Reply to all Help needed badly
I know nothing about VBA in outlook but I need to create a macro. I
need to be able to highlight an email in my inbox and start the macro which will reply to all for the highlighted email with a simple message like "got it". How do I do this? Is there another way besides a macro? thanks |
Reply to all Help needed badly
Sub DoReply()
Dim itm as Object Dim reply as Outlook.MailItem On Error Resume Next Set itm = Application.ActiveExplorer.Selection(1) If itm.Class = olMail Then Set reply = itm.ReplyAll reply.Body = "Got it" & vbCrLf & vbCrLf & reply.Body reply.Send End If Set itm = Nothing Set reply = Nothing End Sub If you need basics on writing Outlook macros, see http://outlookcode.com/article.aspx?id=49. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 wrote in message ... I know nothing about VBA in outlook but I need to create a macro. I need to be able to highlight an email in my inbox and start the macro which will reply to all for the highlighted email with a simple message like "got it". How do I do this? Is there another way besides a macro? thanks |
Reply to all Help needed badly
On Apr 8, 2:29*pm, "Sue Mosher [MVP]" wrote:
Sub DoReply() * * Dim itm as Object * * Dim reply as Outlook.MailItem * * On Error Resume Next * * Set itm = Application.ActiveExplorer.Selection(1) * * If itm.Class = olMail Then * * * * Set reply = itm.ReplyAll * * * * reply.Body = "Got it" & vbCrLf & vbCrLf & reply.Body * * * * reply.Send * * End If * * Set itm = Nothing * * Set reply = Nothing End Sub If you need basics on writing Outlook macros, seehttp://outlookcode.com/article.aspx?id=49. -- Sue Mosher, Outlook MVP that works great. thanks. I will check out that site also. * *Author of Microsoft Outlook 2007 Programming: * * *Jumpstart for Power Users and Administrators * *http://www.outlookcode.com/article.aspx?id=54 wrote in message ... I know nothing about VBA in outlook but I need to create a macro. *I need to be able to highlight an email in my inbox and start the macro which will reply to all for the highlighted email with a simple message like "got it". *How do I do this? *Is there another way besides a macro? thanks |
Reply to all Help needed badly
Is it possible to maintain the formatting of the original email in the
reply? The reply I am producing loses the spacing, text size, and border lines from the original. thanks On Apr 8, 3:57*pm, wrote: On Apr 8, 2:29*pm, "Sue Mosher [MVP]" wrote: Sub DoReply() * * Dim itm as Object * * Dim reply as Outlook.MailItem * * On Error Resume Next * * Set itm = Application.ActiveExplorer.Selection(1) * * If itm.Class = olMail Then * * * * Set reply = itm.ReplyAll * * * * reply.Body = "Got it" & vbCrLf & vbCrLf & reply.Body * * * * reply.Send * * End If * * Set itm = Nothing * * Set reply = Nothing End Sub If you need basics on writing Outlook macros, seehttp://outlookcode.com/article.aspx?id=49. -- Sue Mosher, Outlook MVP that works great. *thanks. I will check out that site also. * *Author of Microsoft Outlook 2007 Programming: * * *Jumpstart for Power Users and Administrators * *http://www.outlookcode.com/article.aspx?id=54 wrote in message .... I know nothing about VBA in outlook but I need to create a macro. *I need to be able to highlight an email in my inbox and start the macro which will reply to all for the highlighted email with a simple message like "got it". *How do I do this? *Is there another way besides a macro? thanks |
Reply to all Help needed badly
The Body property contains only the plain text representation of the item
body. If you want formatting, you need to work with HTMLBody and proper HTML tags (instead of constants like vbCrLf). -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 wrote in message ... Is it possible to maintain the formatting of the original email in the reply? The reply I am producing loses the spacing, text size, and border lines from the original. thanks On Apr 8, 3:57 pm, wrote: On Apr 8, 2:29 pm, "Sue Mosher [MVP]" wrote: Sub DoReply() Dim itm as Object Dim reply as Outlook.MailItem On Error Resume Next Set itm = Application.ActiveExplorer.Selection(1) If itm.Class = olMail Then Set reply = itm.ReplyAll reply.Body = "Got it" & vbCrLf & vbCrLf & reply.Body reply.Send End If Set itm = Nothing Set reply = Nothing End Sub wrote in message ... I know nothing about VBA in outlook but I need to create a macro. I need to be able to highlight an email in my inbox and start the macro which will reply to all for the highlighted email with a simple message like "got it". How do I do this? Is there another way besides a macro? thanks |
All times are GMT +1. The time now is 03:26 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com