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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Select Text in body using Redemption



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 8th 07, 07:20 PM posted to microsoft.public.outlook
Michael Salz
external usenet poster
 
Posts: 1
Default Select Text in body using Redemption

I am trying to select text within the body of an e-mail, click a button on a
toolbar and have the selected text appear in a message box.

I have implemented the SafeInspector class of Redemption and have
implemented the following code within the "Click" event handler function of a
toolbar button. It works great when I actually open the e-mail and select
the text. However, if I do not open the e-mail, but highlight the text in
the preview pane the Message Box pops up with no text. Thanks in advance.

Dim objoutlook As Outlook.Application = _Module.HostApplication

Dim sel As Outlook.Selection = objoutlook.ActiveExplorer.Selection



If sel.Count 0 Then

Dim selobject As Object = Nothing

selobject = sel.Item(1)

If TypeOf selobject Is Outlook.MailItem Then

Dim mailitem As Outlook.MailItem = TryCast(selobject, Outlook.MailItem)

Dim editor As Outlook.Inspector = mailitem.GetInspector

Dim sinspector As Redemption.SafeInspector = New Redemption.SafeInspector

sinspector.Item = mailitem.GetInspector

MsgBox(sinspector.SelText)

If TypeOf selobject Is Outlook.MailItem Then

Dim mailitem As Outlook.MailItem = TryCast(selobject, Outlook.MailItem)

Dim editor As Outlook.Inspector = mailitem.GetInspector

Dim sinspector As Redemption.SafeInspector = New Redemption.SafeInspector

sinspector.Item = mailitem.GetInspector

MsgBox("You have selected: " & sinspector.SelText)


 




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
Redemption, "Select Folder(s)" pop-up, How-to? Mike Add-ins for Outlook 1 November 5th 07 05:14 PM
Cannot see text in email body Kevin Outlook Express 2 October 13th 07 06:42 AM
Select all message body and delete Geminist Outlook and VBA 3 February 23rd 07 03:34 PM
no text in body of e-mail jamiebob69 Outlook - Installation 3 February 22nd 07 02:37 AM
Outlook2007 Can't select text Jeff Outlook - General Queries 1 June 7th 06 03:03 PM


All times are GMT +1. The time now is 10:47 AM.


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.