A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

forward event in outlook with c#



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 16th 09, 09:57 AM posted to microsoft.public.outlook.program_addins
Nagaraj
external usenet poster
 
Posts: 22
Default forward event in outlook with c#

Hi All,

I have some text (original message) as follows

iplease see below. i will send another one where its coming on top of the
email/i

I am capturing this text in the mail_forward event in a string

I added some more text (bcurrent text/b which is combination of original
message and some more new text)

In the Item_Send event I want to know the index of original message in the
current text.

The problem is when I print current text it is as follows



div

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

/div


from where these extra lines and p tags o tags are coming? for this
reason
I am unable to find original message in the current text. i.e. I want to
find the index of original message in the new text. Can anyone tell me how to
do this in c#

Thanks



--
Nagaraj Tadipatri
  #2  
Old March 16th 09, 03:09 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default forward event in outlook with c#

Outlook will rewrite your HTML so you can't depend on it remaining exactly
as you set it. We went through this before if I'm not mistaken. You just
look for your string as a substring of the HTMLBody property to get where it
starts. If you want the index of where a div tag starts then get your text
index and work backwards from there.

There are a limited number of ways that Outlook will rewrite your text,
depending on Outlook version and whether or not WordMail is enabled. Those
are all properties you can check at runtime. If you get the pattern of how
the HTML is rewritten on each permutation of Outlook/WordMail you intend to
support you can use that information to know what to look for in that
specific case.

--
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
...
Hi All,

I have some text (original message) as follows

iplease see below. i will send another one where its coming on top of
the
email/i

I am capturing this text in the mail_forward event in a string

I added some more text (bcurrent text/b which is combination of
original
message and some more new text)

In the Item_Send event I want to know the index of original message in the
current text.

The problem is when I print current text it is as follows



div

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

/div


from where these extra lines and p tags o tags are coming? for this
reason
I am unable to find original message in the current text. i.e. I want to
find the index of original message in the new text. Can anyone tell me how
to
do this in c#

Thanks



--
Nagaraj Tadipatri


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event loop when saving Task item in event handler Mustafa Add-ins for Outlook 1 August 8th 08 07:24 PM
forward event of Custom form cynthia Outlook - Using Forms 5 March 9th 07 03:37 PM
Outlook 2003 Auto Forward Rules do not forward Attachment Correctly Tom Ewald Outlook - General Queries 0 March 8th 07 06:04 PM
No permission for "forward" event in Outlook Form movalgirl Outlook - Using Forms 0 February 28th 07 11:33 AM
How to setup a rule to forward rule in Outlook (xp or 2003) to forward emails from a certain domain when app isnt running? KingCronos Outlook - General Queries 7 November 15th 06 12:22 PM


All times are GMT +1. The time now is 07:51 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-2025 Outlook Banter.
The comments are property of their posters.