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 / August 2006

Tip: Looking for answers? Try searching our database.

Replace All Text in a TextFrame

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Jones - 25 Aug 2006 21:37 GMT
I'm running PowerPoint 2003, SP2 and have many presentations that have
differing dates in a TextFrame in the TitleMaster.  It's easy to
establish an object and replace the year, for example, but since I
don't know the day and month I need to replace all the text in the
TextFrame.  Trying to do so using a constant doesn't work because an
object is required.  

Has anyone any ideas how to spin through the shapes on the TitleMaster
and when I get to the TextFrame with the date in it replace all the
data with a new date?

Thank you,
Jeff
John Wilson - 25 Aug 2006 22:25 GMT
Assuming the date is in the date area placeholder

Sub datechange()
Dim oshp As Shape
For Each oshp In ActivePresentation.SlideMaster.Shapes
If oshp.HasTextFrame And oshp.TextFrame.HasText Then
If oshp.PlaceholderFormat.Type = 16 Then
oshp.TextFrame.TextRange = "insert date here"
End If
End If
Next
End Sub
Signature


Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html

> I'm running PowerPoint 2003, SP2 and have many presentations that have
> differing dates in a TextFrame in the TitleMaster.  It's easy to
[quoted text clipped - 9 lines]
> Thank you,
> Jeff
Jeff Jones - 26 Aug 2006 00:58 GMT
Hi John,

Unfortunately the TextFrame is not the standard date placeholder.

However, maybe the line where the TextRange sets the date will do the
trick.

Is there a way to validate the name of a text box?  For example I know
that at least in some of the TitleMasters the object I want it "Text
Box 10" so if I can ascertain this property, then it's easy to select
it and replace the text within it.

>Assuming the date is in the date area placeholder
>
[quoted text clipped - 8 lines]
>Next
>End Sub
Jeff Jones - 26 Aug 2006 01:04 GMT
Hi John,

The line below worked!  Thank you VERY much.  I was really wrestling
with this wonderfulness.

oshp.TextFrame.TextRange = "insert date here"

I wish you enough,
Jeff

>Assuming the date is in the date area placeholder
>
[quoted text clipped - 8 lines]
>Next
>End Sub
 
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.