![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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 |
#5
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rule: "Reply using a specific template" doesn't reply to Reply-To: | mhgreene | Outlook and VBA | 7 | March 28th 08 08:59 PM |
My reply address is correct but I do not receive reply emails | Rebecca Bassett | Outlook - General Queries | 1 | November 8th 07 07:53 AM |
Creating mailitem with reply/reply to all/forward buttons | chrisl | Outlook - Using Forms | 3 | June 21st 07 11:55 PM |
Get parent message (original) from the response created by Reply-All/Reply/Forward | Sanjay | Add-ins for Outlook | 3 | November 9th 06 05:02 PM |
Outlook 2003 does not reply with original reply headers indented | Sriram | Outlook - General Queries | 0 | May 17th 06 04:46 PM |