D
Dave
I seem to be unable to get my hands on the textrange for selected text
contained within a table cell in PPT 2007. I did have some code that
worked in PPT 2003 (definitions, etc. removed for brevity):
' anything selected that contains text?
With ActiveWindow.Selection
' has more than one shape been selected?
If .Type = ppSelectionText Then
If .TextRange <> "" Then <== error on this line
Set temp = .TextRange
tRanges.Add temp
Else
For i = 1 To ActiveWindow.Selection.ShapeRange.Count
BuildTextRangeCollection
ActiveWindow.Selection.ShapeRange(i), tRanges
Next i
End If
..
..
..
When I run this code in 2007 with a portion of the text in one table
cell selected, I get a "Specified value is out of range" VBA error on
the specified line.
If I run the code with a complete cell or cells selected, I don't get
the error, but the routine at BuildTextRangeCollection is unable to
identify any textranges associated with the selected shapes.
Is there a workaround for this? Thanks ...
contained within a table cell in PPT 2007. I did have some code that
worked in PPT 2003 (definitions, etc. removed for brevity):
' anything selected that contains text?
With ActiveWindow.Selection
' has more than one shape been selected?
If .Type = ppSelectionText Then
If .TextRange <> "" Then <== error on this line
Set temp = .TextRange
tRanges.Add temp
Else
For i = 1 To ActiveWindow.Selection.ShapeRange.Count
BuildTextRangeCollection
ActiveWindow.Selection.ShapeRange(i), tRanges
Next i
End If
..
..
..
When I run this code in 2007 with a portion of the text in one table
cell selected, I get a "Specified value is out of range" VBA error on
the specified line.
If I run the code with a complete cell or cells selected, I don't get
the error, but the routine at BuildTextRangeCollection is unable to
identify any textranges associated with the selected shapes.
Is there a workaround for this? Thanks ...