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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|