Select Text in active mail (and save it to a database)

Add-in Express™ Support Service
That's what is more important than anything else

Select Text in active mail (and save it to a database)
Develop a solution for managed text moduls out of Outlook and for use in Outlook 

Posts: 3
Joined: 2014-04-10
In my existing Outlook AddIn, I'm trying to devolop a new function:

1. select a text in an open email
2. copy this text
3. save it (in html & text format) in a database

Goal should be a management for individual text modules


1. how can I get the selected text out of the active email, which is open in edit mode ?
(I searched the forum and internet, and didn't find anything, thats works)

Code example in would be very nice :)

2. what would be the best datatype to save outlook text (formatted and plain) in a database ?

Thanks in advance
Posted 27 Apr, 2020 08:59:51 Top
Andrei Smolin

Add-in Express team

Posts: 17438
Joined: 2006-05-11
Hello Klaus,

Get Inspector.WordEditor, cast it to Word.Document, get Document.Windows, get Windows.Item(1), get window.Selection, get Selection.Range. The resulting Range object contains all the information about selected *text*; the text itself is in Range.Text. Other properties of the Word.Selection object return tables, images, etc.

I can't answer #2. You are in a better position to answer it.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Apr, 2020 09:25:09 Top