The PowerPoint 2000 screen shot shows a selection of a part, whole and part paragraph in a text frame.
The VBA expression "Activewindow.Selectiont.TextRange.Paragraphs.coun t" returns a value of THREE.
The VBA expression "Activewindow.Selection.TextRange.Characters.Count " returns a value of 30 which confirms my view.
The VBA expression "Activewindow.Selection.TextRange.Paragraphs(1,1). Text" returns a LEN=7 set of characters which set of characters appears to be "aph 4" followed by a vbCrLf.
The help screens include this:
If both Start and Length are omitted, the returned range starts with the first paragraph and ends with the last paragraph in the specified range.
If Start is specified but Length is omitted, the returned range contains one paragraph.
If Length is specified but Start is omitted, the returned range starts with the first paragraph in the specified range.
If Start is greater than the number of paragraphs in the specified text, the returned range starts with the last paragraph in the specified range.
If Length is greater than the number of paragraphs from the specified starting paragraph to the end of the text, the returned range contains all those paragraphs.
It seems to me that the .Paragraphs() construct does not function as a WordVBAer would expect.
It does not return the entire paragraph that holds the selected text, only that portion which is still selected.
Coupled with my earlier observation ("Length of the selection is zero") this presents a difficulty for the programmer would like to format a selection based on an end-user's "click".
PowerPoint does not appear to provide the same sense as Word, where one can click to establish the insertion point, and then (as a developer) treat the embracing word, sentence or paragraph as a unit.
I had expected "Activewindow.Selection.TextRange.Paragraphs(1,1). Text"to return "Paragr aph 4" (& vbCrLf)
The "Activewindow.Selection.TextRange.Paragraphs.Start " offered a faint ray of hope - .START returns Returns the position of the first character in the specified text range relative to the first character in the shape that contains the text, but there is no counterpart .END property that applies to a TextRange property.
On the bright side I have discovered that the TextRange object can provide one with the Runs. (A text run consists of a range of characters that share the same font attributes.)




