View Single Post
  #6  
Old March 10th 09, 06:34 AM posted to microsoft.public.outlook.program_addins
Nagaraj
external usenet poster
 
Posts: 22
Default mailItem.HTMLBody should retrieve only current text

Hello Ken,

I have the following text in the original text within the body


divplease see below. i will send another one where its coming on top of
the email./divdivbr/divdivraghu/divdiv style="font-family:times
new roman, new york, times, serif;font-size:12pt"brdiv
style="font-family:times new roman, new york, times,
serif;font-size:12pt"font size="2" face="Tahoma"----- Forwarded Message
----brbspan style="font-weight: bold;"From:/span/b Steve Waterhouse
brbspan style="font-weight:
bold;"To:/span/b brbspan style="font-weight:
bold;"Sent:/span/b Thursday, March 5, 2009 3:22:01 PMbrbspan
style="font-weight: bold;"Subject:/span/b FW: testbr/fontbr



new text message contains


div class=Section1

p class=MsoNormalspan
style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'fwdo/o/span/p

p class=MsoNormalspan
style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'o /o/span/p

div

div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in
0in'

p class=MsoNormalbspan
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'From:/span/bspan
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"' sridhar
] br
bSent:/b Friday, March 06, 2009 2:36 AMbr
bTo:/b Nagarajbr
bCc:/b Vikram Rayabharibr
bSubject:/b Fw: testo/o/span/p

/div

/div

p class=MsoNormalo /o/p

div

div

p class=MsoNormalplease see below. i will send another one where its coming
on top of the email.o/o/p

/div

div

p class=MsoNormalo /o/p

/div


My problem is I am unable to search the text in the original text

divplease see below. i will send another one where

in the new message text because in the new text p class=MsoNormal tag is
attached to the modified text as follows

div

p class=MsoNormalplease see below. i will send another one where its coming


Can you suggest me how to get the index of 'please see below' in the new
message text


Thanks





Nagaraj Tadipatri


"Ken Slovak - [MVP - Outlook]" wrote:

You will have to do what I said, any code I have for something like that is
so customized for specific clients it wouldn't do you much good. Find the
original text within the body /body tags and the new text in the reply
message and find where the new text was added to the old text. You might
also have to parse the text to remove any existing signatures if they are
present in the text.

--
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 actual requirement is I already have some message replied to me.
Whenever
I reply back to him I want to display (company signature) immediately
after
new text which i reply to him.

But what is happening is the signature is displayed after entire text
(current text and previous message).

My current code
mailItem.HTMLBody = mailItem.HTMLBody + adContent.text;

where adContent.text is the company signature.

My requirement is i want to display company signature immediately after my
reply text but not at end of entire message( current + previous messages).
Do
you have any C# code to do this?

Thanks
is

--
Nagaraj Tadipatri



Ads