[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Getting Selected Text From Outlook

Posted on 2009-07-09
4
Medium Priority
?
187 Views
Last Modified: 2012-05-07
Is there any was to programatically get at whatever text is currently selected in Outlook?  I tried VBA.SendKeys "^c" as a last resort but even that didn't work.  Any ideas?

Mike
0
Comment
Question by:shacho
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24820572
Hello shacho,

Try the following code section .. it works on any mailitem but is defined here to work with the selected text in the open mailitem.

Regards,
Chris
Sub getsel()
Dim itm As Object
Dim insp As Inspector
Dim wd As Object 
    Set itm = Application.ActiveInspector.CurrentItem
    Set insp = itm.GetInspector
    Set wd = insp.WordEditor
    msgbox "Current Selection", wd.Windows(1).Selection
    
End Sub

Open in new window

0
 

Author Comment

by:shacho
ID: 24837806
That might work except I don't use word as my editor and the selected text is in the preview pane, not an open item.  As such there is no active inspector.  Any idea how to get at the preview pane?
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 2000 total points
ID: 24838276
In that case, no.

Chris
0
 

Author Comment

by:shacho
ID: 24902541
Oh well.  Thanks for your comments.

Mike
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Mailbox Overload?
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question