get current position in message body of mailitem

  • Thread starter Thread starter sd
  • Start date Start date
S

sd

hello

is it possible to get current cursor position (where next text will
appear) in message body of mailitem so that some predefined text/link
can be added at that position?

Thanks
 
I found cursor position related information on outlookcode.com for
both OL 2003 & OL 2007
Thanks Ken
 
I need to move to end of the word if the current cursor position is in
between the word and then insert the link.For OL 2007 using WordEditor
object it is possible.But for OL 2003 when word is not editor (for
plain text,HTML body format) how to accomplish this?
using redemption safeinspector I can insert the link at current cursor
position but how to know if current cursor position is in between the
word ?

Thanks again
 
You'd need to parse that out yourself. You'd get the position and the full
text and see if the position was at the end of the text or somewhere within
the text.
 
I was able to find out if the cursor is in between for Plain text
format but how to achive the same for HTML format ?SafeInspector has
HTMLEditor property but was unable to find if cursor is in between the
word.
Thanks again
 
HTMLEditor is an IHTMLDocument object, you would use that object model or
one derived from it.
 
Thanks again.I was able to move to next/previous word with the help of
HTMLEditor.But is there any way to find out the char at current cursor
position using HTMLEditor?(as I need to insert link to end of word if
cursor is in between the word otherwise just insert link at current
cursor position)

Thanks
 
I don't do enough with IHTMLDocument to know that offhand. Take a look at
the object model for that object and see.
 
Dear Ken,

I downloaded your VB6Addin sample project from your website and it works perfectly for outlook 2007. But with outlook 2010 , the dll fails to register. (it says either inactive add in or does not even shown in the list of addin).

Your help and comments will be very valuable.

Thanks and regards,
Shab Resh
(e-mail address removed)
Version of Outlook? WordMail or not?


On Wednesday, August 19, 2009 9:49 AM Ken Slovak - [MVP - Outlook] wrote:
You'd need to parse that out yourself. You'd get the position and the full
text and see if the position was at the end of the text or somewhere within
the text.
On Friday, August 21, 2009 9:24 AM Ken Slovak - [MVP - Outlook] wrote:
HTMLEditor is an IHTMLDocument object, you would use that object model or
one derived from it.
On Friday, August 28, 2009 9:27 AM Ken Slovak - [MVP - Outlook] wrote:
I do not do enough with IHTMLDocument to know that offhand. Take a look at
the object model for that object and see.
 
As I already answered in a private email, I had no problems making up an
installer and installing and running that VB6 addin sample in Outlook 2010
32-bit.

It will never run in 64-bit Outlook as VB6 addins are 32-bit only and cannot
run in 64-bit Outlook.
 
Back
Top