
Signature
Ed Bennett - MVP Microsoft Publisher
> .TextFrame.TextRange.Story.TextRange.Text
Thank you, Ed! That solved it!
I have another question, while I'm at it. If I set the value of .Text,
then later retrieve it, Publisher puts a CR on the end of the text even
though I didn't put a CR on the end initially.
Also, if I manually examine the text in Publisher, there doesn't appear
to be a CR on the end.
It isn't a major issue. I now know to look for the CR and to strip it.
It's just annoying. :)
Thanks again Ed!

Signature
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
Ed Bennett - 08 Feb 2005 20:42 GMT
> It isn't a major issue. I now know to look for the CR and to strip
> it. It's just annoying. :)
If you go to the end of a text box in Publisher (press Ctrl-End), and press
Shift-Right, the paragraph mark at the end of the last paragraph becomes
selected.
There is always a paragraph mark at the end of a text box.
You can just use Left$(TextRange.Text, Len(TextRange.Text) - 1)
(Note that if you are iterating through text boxes looking for empty ones,
Len(TextRange.Text) will be 1, not 0, as empty text boxes always contain a
paragraph mark.

Signature
Ed Bennett - MVP Microsoft Publisher