View Single Post
  #4  
Old April 9th 09, 07:46 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default To know new message length

I don't understand your issue. Add the 2 lines, then calculate the length,
then do what you're doing in Send() and get the difference. The code you
show should work,

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Nagaraj" wrote in message
...
Thank you Ken for your reply.

My requirement is when I open an existing mail item and click Forward
button, it will automatically add 2 blank lines. So when I calculate the
difference between those two values it is even counting blank characters
also.

I declared one variable originalMessage and assigned it a value in the
mail_Forward event as follows


originalMessage = forwardMail.HTMLBody;

In the Item_Send event I am calculating legth as follows

length = mailItem.HTMLBody.Trim()Length - originalMessage.Trim().Length



where length is coming as 1537

I want to validate new message length to be 0 since I didn't enter any new
characters. How to do this in c#

Thanks
--
Nagaraj Tadipatri


Ads