A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

how to access current text selection



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 12th 07, 10:17 AM posted to microsoft.public.outlook.program_forms
DavidH&P
external usenet poster
 
Posts: 16
Default how to access current text selection

Hi,

I'm using vsto2005SE,
I would like to access to the current text selection of the current MailItem
selection,
How to do that ?

thanks,

David
  #2  
Old February 12th 07, 03:09 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default how to access current text selection

If it's plain text or RTF in the Outlook editor you cannot. For HTML you
would get the HTML.Document and use the HTML Document object model. For
WordMail you get the Word.Document and use that object model.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"DavidH&P" wrote in message
...
Hi,

I'm using vsto2005SE,
I would like to access to the current text selection of the current
MailItem
selection,
How to do that ?

thanks,

David


  #3  
Old June 29th 09, 06:00 PM posted to microsoft.public.outlook.program_forms
xiahmi
external usenet poster
 
Posts: 5
Default how to access current text selection

Hi Ken,

What do you mean?
"If it's plain text or RTF in the Outlook editor you cannot"
I cannot get the selection?

This is the scenario..

The user selects a part of the mail message/body and I should be able to
copy the selected items and store it as pdf.

Outlook.Selection selection = myActiveExplorer.Selection;

if (selection is Outlook.MailItem)
{
Outlook.MailItem mailItem =
(selection as Outlook.MailItem);

mailItem.Copy();

}

I believe that this would copy the entire mail right?

I only need to copy the selected objects..
and what would be the possible solution of converting a mail into pdf?

Thanks

"Ken Slovak - [MVP - Outlook]" wrote:

If it's plain text or RTF in the Outlook editor you cannot. For HTML you
would get the HTML.Document and use the HTML Document object model. For
WordMail you get the Word.Document and use that object model.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"DavidH&P" wrote in message
...
Hi,

I'm using vsto2005SE,
I would like to access to the current text selection of the current
MailItem
selection,
How to do that ?

thanks,

David



  #4  
Old June 30th 09, 01:43 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default how to access current text selection

I think you're confusing two different selections. Outlook.Selection is the
collection of items that are selected. That you can get. As far as getting
what text is selected in a specific email item what I said before goes.
Using the Outlook object model you can't get what text is selected.

If you are using the 3rd party library Redemption
(www.dimastr.com/redemption) you can get the appropriate editor for the type
of item (HTML, plain text, RTF) and that will let you get the selected text.
Otherwise, as I said before, for HTML you would get the HTML.Document and
use the HTML Document object model. For WordMail you get the Word.Document
and use that object model.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"xiahmi" wrote in message
...
Hi Ken,

What do you mean?
"If it's plain text or RTF in the Outlook editor you cannot"
I cannot get the selection?

This is the scenario..

The user selects a part of the mail message/body and I should be able to
copy the selected items and store it as pdf.

Outlook.Selection selection = myActiveExplorer.Selection;

if (selection is Outlook.MailItem)
{
Outlook.MailItem mailItem =
(selection as Outlook.MailItem);

mailItem.Copy();

}

I believe that this would copy the entire mail right?

I only need to copy the selected objects..
and what would be the possible solution of converting a mail into pdf?

Thanks


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create text box from combo selection Xform Outlook - Using Forms 3 January 31st 07 06:03 PM
Outlook Text Only Export into Access LI_SpeedyG Outlook and VBA 1 December 15th 06 05:12 PM
Import Outlook Body as text only into Access LI_SpeedyG Outlook and VBA 1 December 15th 06 02:40 PM
Programmatically send Email text containing hyperlinks from Access momotaro Outlook and VBA 2 May 4th 06 08:44 PM
shortcut to strikethrough the current selected text in a message Beth MC Outlook and VBA 1 March 3rd 06 08:36 PM


All times are GMT +1. The time now is 10:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.