A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

different text place holders



 
 
Thread Tools Display Modes
  #1  
Old July 24th, 2008, 08:57 PM posted to microsoft.public.powerpoint
edward
external usenet poster
 
Posts: 420
Default different text place holders

Hi everybody,
IS there any difference between textplaceholder,title placeholder and
textbox when we use VBA if yes what are the keywords for each of them in VBA?
( how do I refer to a text box vs. a title placeholder)
--
Best regards,
Edward
  #2  
Old July 24th, 2008, 10:08 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default different text place holders

In article , Edward wrote:
Hi everybody,
IS there any difference between textplaceholder,title placeholder and
textbox when we use VBA if yes what are the keywords for each of them in VBA?
( how do I refer to a text box vs. a title placeholder)


There are some differences, yes, but at the same time, each is a shape with a
text range and so on, so depending on what you're trying to do, you might be
able to treat them identically.

What exactly do you need to accomplish?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com

  #3  
Old July 24th, 2008, 10:44 PM posted to microsoft.public.powerpoint
edward
external usenet poster
 
Posts: 420
Default different text place holders

Thanks Steve. For example I want to make a TOC table based on Title
placeholders so I need a way to distinguish between titleplaceholder and
other type of text holders , or I want to have a macro to apply a certain
font style to all the textes in text placeholders ( not titles ) and so on...
basically when I loop through all the shapes I need to tell which shape os
title or text or textbox .
Thanks for your help again.
--
Best regards,
Edward


"Steve Rindsberg" wrote:

In article , Edward wrote:
Hi everybody,
IS there any difference between textplaceholder,title placeholder and
textbox when we use VBA if yes what are the keywords for each of them in VBA?
( how do I refer to a text box vs. a title placeholder)


There are some differences, yes, but at the same time, each is a shape with a
text range and so on, so depending on what you're trying to do, you might be
able to treat them identically.

What exactly do you need to accomplish?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com


  #4  
Old July 25th, 2008, 05:03 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default different text place holders

In article , Edward wrote:
Thanks Steve. For example I want to make a TOC table based on Title
placeholders so I need a way to distinguish between titleplaceholder and
other type of text holders ,


This'll give you the title:

Function GetTitle(oSld As Slide) As Shape
' return the title for oSld if any

Dim oSh As Shape

For Each oSh In oSld.Shapes
If oSh.Type = msoPlaceholder Then
If oSh.PlaceholderFormat.Type = ppPlaceholderTitle _
Or oSh.PlaceholderFormat.Type = ppPlaceholderCenterTitle Then
' it's a title
Set GetTitle = oSh
End If
End If
Next

End Function

So:

Dim oSl as Slide
Dim oSh as Shape

For each oSl in ActivePresentation.Slide
Set oSh = GetTitle(oSl)
If Not oSh = Nothing Then
' do your stuff with oSh
End if
Next

Modify GetTitle with slightly different tests and you have GetBodyText and so
on.

or I want to have a macro to apply a certain
font style to all the textes in text placeholders ( not titles ) and so on...
basically when I loop through all the shapes I need to tell which shape os
title or text or textbox .
Thanks for your help again.


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com

  #5  
Old July 25th, 2008, 06:02 PM posted to microsoft.public.powerpoint
edward
external usenet poster
 
Posts: 420
Default different text place holders

Thanks Steve. I will work on your code on weekend . Thanks a lot a again
--
Best regards,
Edward


"Steve Rindsberg" wrote:

In article , Edward wrote:
Thanks Steve. For example I want to make a TOC table based on Title
placeholders so I need a way to distinguish between titleplaceholder and
other type of text holders ,


This'll give you the title:

Function GetTitle(oSld As Slide) As Shape
' return the title for oSld if any

Dim oSh As Shape

For Each oSh In oSld.Shapes
If oSh.Type = msoPlaceholder Then
If oSh.PlaceholderFormat.Type = ppPlaceholderTitle _
Or oSh.PlaceholderFormat.Type = ppPlaceholderCenterTitle Then
' it's a title
Set GetTitle = oSh
End If
End If
Next

End Function

So:

Dim oSl as Slide
Dim oSh as Shape

For each oSl in ActivePresentation.Slide
Set oSh = GetTitle(oSl)
If Not oSh = Nothing Then
' do your stuff with oSh
End if
Next

Modify GetTitle with slightly different tests and you have GetBodyText and so
on.

or I want to have a macro to apply a certain
font style to all the textes in text placeholders ( not titles ) and so on...
basically when I loop through all the shapes I need to tell which shape os
title or text or textbox .
Thanks for your help again.


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.