Office 2003
Please excuse the multi-post, but I'm using Microsofts Discussion Group web
interface, and cannot figure out how to do a cross post.
What is the appropriate property of a textbox type shape to change the text
that appears in the shape, programmatically?
I'm creating a customized charting function, and want to create a legend on
the fly, but need to know how to change the text inside the textbox.
Dale

Signature
email address is invalid
Please reply to newsgroup only.
vindys - 12 Mar 2008 04:13 GMT
If ActivePresentation.Slides(1).Shapes(1).Type = msoTextBox Then
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "some text"
End If
this will be a simple way to change the text. also u have text inside each
runs and paraformat.
> Office 2003
>
[quoted text clipped - 8 lines]
>
> Dale
John Wilson - 12 Mar 2008 09:01 GMT
Are you creating the box with code? If you are using the AddTextBox method
you can use something like
Dim otxtbox As Shape
'values are left,top,width and height
Set otxtbox = ActivePresentation.Slides(1).Shapes _
.AddTextbox(msoTextOrientationHorizontal, 0, 0, 200, 50)
With otxtbox.TextFrame.TextRange
'change these to suit
.Text = "Abcdef"
.Font.Name = "Arial"
.Font.Size = 12
.Font.Color = RGB(100, 100, 0)
End With
Set otxtbox = Nothing

Signature
Amazing PPT Hints, Tips and Tutorials
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
> Office 2003
>
[quoted text clipped - 8 lines]
>
> Dale
Dale Fye - 12 Mar 2008 12:40 GMT
Thanks, both of you.
Your responses were right on the mark. Never would have thought about
digging quite so deep as TextFrame.TextRange.Text

Signature
email address is invalid
Please reply to newsgroup only.
> Are you creating the box with code? If you are using the AddTextBox method
> you can use something like
[quoted text clipped - 24 lines]
> >
> > Dale