PDA

View Full Version : Getting selected text from Outlook email???



mavol
11-17-2008, 08:23 AM
I've posted on this before and got some great help from jfournier on it.

jfournier provided the below that works great for emails that are in HTML format, but I still can't get anything to work for rich text or plain text. I'm still trying and trying....:dunno

Thanks again jfournier.

Function GetSelectedTextOnActiveWindow() AsString
On Error Resume Next
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Case "Inspector" GetSelectedTextOnActiveWindow = ActiveInspector.HTMLEditor.Selection.createRange.Text
Case Else
End Select
On Error Goto 0
End Function