Reputation: 422
I'm writing an outlook email plugin which needs to insert HTML code where the pointer is currently located.
How can I read out the current cursor position in the email i'm currently editing? I'm writing an application level addin.
Maybe someone can help me? Thank you.
Upvotes: 2
Views: 1381
Reputation: 49395
The Outlook object model provides three different ways for working with item bodies:
You can read more about all these ways in the Chapter 17: Working with Item Bodies in MSDN.
The simplest way to get the job done is to use the Word object model for modifying the message body. For example:
mail.GetInspector().WordEditor
Then you can use the Word object model for working with message body. The Selection property of the Word Application class will help you to identify the current cursor position.
Upvotes: 2