PDA

View Full Version : Reply to All.



yuvrajsp
05-27-2014, 12:02 AM
Greetings,

I have been working on a project & was curious to know if there is any macro where in I click the macro, a compose window opens with all the names in the email I received (reply all, basically) with a fixed text which I can edit.

I have been using the below macro, but then this does not have the email I received as part of the email that I want to send. I have come with the below macro, just that it does not include the original email as part of the reply to all.

Sub EmailReply()
Dim MyItem As Outlook.MailItem
Dim currItem As Outlook.MailItem
Set Original = Application.ActiveExplorer.Selection(1)
Set Reply = Original.ReplyAll
Reply.Subject = Original.Subject
Reply.Body = "Dear _____," & vbNewLine & vbNewLine & "The order has been modified as per your request." & vbNewLine & vbNewLine & "Change Detail: (Item Name & quantities updated)." & vbNewLine & "Reason: (as mentioned by the CS dept)"
Reply.Display
End Sub

westconn1
05-27-2014, 02:09 AM
Reply.Body = "Dear _____," this would overwrite (replace) any previous body text try appending or prepending to the original text

try like

mitem.Body = "qwerty 123456" & vbNewLine & mitem.Body

yuvrajsp
05-27-2014, 02:14 AM
Greetings,

Can you show me how the macro should read?

I am unable to append it as per your feedback.

westconn1
05-27-2014, 02:44 AM
I am unable to append it as per your feedback.
why?
what happens?
wrong result?
error?
nothing?

it works correctly on my test
no difference to your code except the mail item object name
for your exact code try

Reply.Body = "Dear _____," & vbNewLine & vbNewLine & "The order has been modified as per your request." & vbNewLine & vbNewLine & "Change Detail: (Item Name & quantities updated)." & vbNewLine & "Reason: (as mentioned by the CS dept)" & vbnewline & reply.bodybut you may still need to make some changes, to obtain the desired results

yuvrajsp
05-27-2014, 04:03 AM
.

yuvrajsp
05-27-2014, 04:08 AM
One last question, is there a way where I can have selected text in a macro to be red or any other color?

westconn1
05-27-2014, 06:00 AM
yes using the editor of the inspector, the code would depend if you are using word or html as default editor, or if you are changing the editor from default

on rereading the phrasing of your question is ambiguous, please clarify what you want to achive

yuvrajsp
05-27-2014, 08:13 AM
Westconn1,

I want to achieve the below results

Dear_____,


Theorder has been modified as per your request.

ChangeDetail: (Item Name & quantities updated).
Reason:(as mentioned by the CS dept).

westconn1
05-27-2014, 02:29 PM
ok, that is what i first though, but was not sure

i will look at it later