Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture non selectable text in IE Web e-mail OWA

Status
Not open for further replies.

mnolting

Programmer
Oct 6, 2008
26
US
I need to capture text in an Outlook web app IE e-mail program.
The text to be captured is the highlighted e-mail (which is yellowish / orange)
I need the VB application to run formless / in the background and return to the calling program the text of the highlighted e-mail.

I see a lot of threads about capturing, however, it is always Selected text. The text to be captured will be Highlighted, not Selected, there is no way to select it. I will have a form running with a button on it named "Capture text of Highlighted e-mail". When clicked, it will capture the text of the Highlighted e-mail, which is the name of the sender and the subject line.

Thanks for your help

 
I have the following code which goes down the 'inspector' route, I think you may need to follow the 'explorer' route...

Code:
Dim OlObj As Object
                On Error Resume Next
                Set OlObj = GetObject(, "Outlook.Application")
                If Err Then
                    On Error GoTo ErrHandler
                    Set OlObj = CreateObject("Outlook.Application")
                End If
                On Error GoTo ErrHandler
                                
                With OlObj
                    If TypeName(.ActiveWindow) = "Inspector" Then
                        'Outlook is displaying a single email as opposed to "Explorer" when displaying a folder containing a list of emails
                        With .ActiveInspector.CurrentItem
                            'blah
 
Hugh,
The application I am using is not Outlook, it is Internet Explorer at a Outlook web page.
The title bar is "my name Outlook web app Microsoft"
It shows a number of e-mails on the page but only one is highlighted. That is the one I need the subject line text.
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top