how to insert text in inspector's editor window?

C

Chen Bin

I am developing an addin for outlook2000 with VC/ATL.
Now I want to insert (NOT append) the text into the mailitem's body.
The problem is that I can not find Inspector.Selection or MailItem.Selection
or MailEditor.Selection interface.

I searched internet and got no idea.

if I can get the email editor window's handle, I can also use clipboard api
to insert
text. But I do not know how to get the editor window's handle!

Can anyon help me?
Thanks in advance.

redguard
 
D

Dmitry Streblechenko

Plain text editor: no documented way of doing that, but you can get the
handle of the inspector (QI Inspector for IOleWindow, call
IOleWindow::GetWindow), then find the child editor control.
HTML: Inspector.HTMLEditor.Selection.createRange.text
Word: Inspector.WordEditor.Application.Selection.Text

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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