![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |