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
|
|||
|
|||
Need an advice!
Hi everubody,
In a VBA project I need to add clinets logo to my presentations using VBA some of them might be over 100 slides . I'm thinking to have a placeholder for logo on the first page that I can paste the logo and then run a macro to copy the logo on every other slide. Any thoughts that what kind of placeholder I should use or how should I approach this? I greatly appreciate any suggestions ... -- Best regards, Edward |
#2
|
|||
|
|||
Need an advice!
I have to add that because some slides dont need logos I can't use
master/footer , unles there is a way to use VBA and remove those logos from some slides and leave the rest intact... -- Best regards, Edward "Edward" wrote: Hi everubody, In a VBA project I need to add clinets logo to my presentations using VBA some of them might be over 100 slides . I'm thinking to have a placeholder for logo on the first page that I can paste the logo and then run a macro to copy the logo on every other slide. Any thoughts that what kind of placeholder I should use or how should I approach this? I greatly appreciate any suggestions ... -- Best regards, Edward |
#3
|
|||
|
|||
Need an advice!
Hi Edward,
Some things that are fairly obvious to human eyes are difficult to explain in VBA. The bottom line comes down to - how does the code know which slides get the logo (and if it is in variable locations) and where to put them (both in x,y co-ordinates and layer). If this can be answered using basic logic, than the rest of the mechanics are pretty straight forward. -- Bill Dilworth A proud member of the Microsoft PPT MVP Team Users helping fellow users. http://billdilworth.mvps.org -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ vestprog2@ Please read the PowerPoint FAQ pages. yahoo. They answer most of our questions. com www.pptfaq.com .. "Edward" wrote in message ... I have to add that because some slides dont need logos I can't use master/footer , unles there is a way to use VBA and remove those logos from some slides and leave the rest intact... -- Best regards, Edward "Edward" wrote: Hi everubody, In a VBA project I need to add clinets logo to my presentations using VBA some of them might be over 100 slides . I'm thinking to have a placeholder for logo on the first page that I can paste the logo and then run a macro to copy the logo on every other slide. Any thoughts that what kind of placeholder I should use or how should I approach this? I greatly appreciate any suggestions ... -- Best regards, Edward |
#4
|
|||
|
|||
Need an advice!
In article , Edward wrote:
I have to add that because some slides dont need logos I can't use master/footer , unles there is a way to use VBA and remove those logos from some slides and leave the rest intact... The simplest thing might be to use multiple masters, some with the logo, some without. It'd be fairly simple to write a macro that copies the logo (or any selected graphic) from one slide to the rest of the slides. To keep it from copying to ALL slides, you'd need a way of determining which slides get the logo and which don't. ' This'll copy the selected shape(s) to all other slides: Sub CopyToAllSlides() Dim oSh As ShapeRange Dim oSl As Slide ' be sure to select something first or it will error Set oSh = ActiveWindow.Selection.ShapeRange ' copy the shape oSh.Copy For Each oSl In ActivePresentation.Slides ' don't copy to the slide the shape came from originally If oSl.SlideIndex oSh.Parent.SlideIndex Then oSl.Shapes.Paste End If Next End Sub ----------------------------------------- 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
|
|||
|
|||
Need an advice!
Thanks Steve and Bill . I was thinking if it's possibile to have a hidden
textbox ( or a textbox with hidden symbol ) and when I want to copy the logo I check each slide to see if that hidden symbol exist skip that particuar slide and go to the next? Also I wonder is it possible to access a logo if its part of master using VBA? ( because when the logo or any other object is part of master we can't select it or delete it but I don't know if VBA can help us to delete them.) The Idea of having two different masters seems to work too , Thanks again both of you for your time -- Best regards, Edward "Steve Rindsberg" wrote: In article , Edward wrote: I have to add that because some slides dont need logos I can't use master/footer , unles there is a way to use VBA and remove those logos from some slides and leave the rest intact... The simplest thing might be to use multiple masters, some with the logo, some without. It'd be fairly simple to write a macro that copies the logo (or any selected graphic) from one slide to the rest of the slides. To keep it from copying to ALL slides, you'd need a way of determining which slides get the logo and which don't. ' This'll copy the selected shape(s) to all other slides: Sub CopyToAllSlides() Dim oSh As ShapeRange Dim oSl As Slide ' be sure to select something first or it will error Set oSh = ActiveWindow.Selection.ShapeRange ' copy the shape oSh.Copy For Each oSl In ActivePresentation.Slides ' don't copy to the slide the shape came from originally If oSl.SlideIndex oSh.Parent.SlideIndex Then oSl.Shapes.Paste End If Next End Sub ----------------------------------------- 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 |
#6
|
|||
|
|||
Need an advice!
In article , Edward wrote:
Thanks Steve and Bill . I was thinking if it's possibile to have a hidden textbox ( or a textbox with hidden symbol ) and when I want to copy the logo I check each slide to see if that hidden symbol exist skip that particuar slide and go to the next? That would be simple enough. If you have a shape named "Bubba" or whatever sitting off the slide, you could do: Dim oBubbaShape as Shape On Error Resume Next Set oBubbaShape = oSld.Shapes("Bubba") If Not oBubbaShape Is Nothng Then ' use the code to paste the logo in as quoted earlier End If Also I wonder is it possible to access a logo if its part of master using VBA? Sure, but how you do it may depend on the version of PPT you use. ( because when the logo or any other object is part of master we can't select it or delete it Sure ya can. Manually, View, Master, SlideMaster first. Then select the shape and go to town on it. but I don't know if VBA can help us to delete them.) The Idea of having two different masters seems to work too , Thanks again both of you for your time ----------------------------------------- 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 | |
|
|