troubleshooting Question

How to return a reference to a text object inside the Excel chart object model with VBA?

Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)Flag for United Kingdom of Great Britain and Northern Ireland asked on
VBAMicrosoft PowerPointMicrosoft ExcelMicrosoft Office
10 Comments1 Solution193 ViewsLast Modified:
Is it possible to return a reference to the selected text within a chart object placed on a PowerPoint slide?

In the example below, the text for the chart title object is selected.

Chart text selection
This returns true in the PowerPoint VBE Immediate window:

?ActiveWindow.Selection.Type=ppSelectionText

But both of these return the error "The specified value is out of range.":

?ActiveWindow.Selection.TextRange.Text
?ActiveWindow.Selection.TextRange2.Text

Is there a way to return a reference to these types of formatted text objects within the Excel chart OM?
ASKER CERTIFIED SOLUTION
John Wilson
CEO PowerPoint Alchemy

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros