Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / March 2008

Tip: Looking for answers? Try searching our database.

PowerPoint: Change the text in a text type shape via automation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dale Fye - 11 Mar 2008 20:07 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.