get current position in message body of mailitem

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
 
S

sd

I found cursor position related information on outlookcode.com for
both OL 2003 & OL 2007
Thanks Ken
 
S

sd

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
S

sd

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
 
K

Ken Slovak - [MVP - Outlook]

HTMLEditor is an IHTMLDocument object, you would use that object model or
one derived from it.
 
S

sd

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
 
K

Ken Slovak - [MVP - Outlook]

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

Shab Reesh

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.
 
K

Ken Slovak

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top