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
|
|||
|
|||
Reset slide layout in VBA (PP2007)
In PP2007 I can reset a slide to the definitions of its custom layout
manually (tab Home, group Slides, button Reset). Is there a way to do such a reset in VBA? Thanks for any hints. |
#2
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Does this work?
Dim oLay As PpSlideLayout oLay = ActiveWindow.Selection.SlideRange(1).Layout ActiveWindow.Selection.SlideRange(1).Layout = oLay You maybe want to look at "Hands Off my Master" too http://www.pptalchemy.co.uk/HandOff.html -- Amazing PPT Hints, Tips and Tutorials- http://www.PPTAlchemy.co.uk http://www.technologytrish.co.uk email john AT technologytrish.co.uk "Luca Brasi" wrote: In PP2007 I can reset a slide to the definitions of its custom layout manually (tab Home, group Slides, button Reset). Is there a way to do such a reset in VBA? Thanks for any hints. |
#3
|
|||
|
|||
Reset slide layout in VBA (PP2007)
John, thanks for your message but it don't work.
Anyway, In my opinion the "Layout" property of the slide object shouldn't be used anymore in PP2007, as PP2007 uses the new Custom Layout concept. If you create some new custom slide layouts, the "Layout" property just returns ppLayoutCustom which isn't really helpful. John Wilson wrote: Does this work? Dim oLay As PpSlideLayout oLay = ActiveWindow.Selection.SlideRange(1).Layout ActiveWindow.Selection.SlideRange(1).Layout = oLay You maybe want to look at "Hands Off my Master" too http://www.pptalchemy.co.uk/HandOff.html |
#4
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Luca,
PPT 2007 requires a slightly different approach. All the change it needs is to get the reference to the custom layout and it can be reapplied. Take a look at this page. http://skp.mvps.org/2007/ppt002.htm -- Regards, Shyam Pillai Animation Carbon: Copy/Paste/Share animation libraries. www.animationcarbon.com "Luca Brasi" wrote in message ... John, thanks for your message but it don't work. Anyway, In my opinion the "Layout" property of the slide object shouldn't be used anymore in PP2007, as PP2007 uses the new Custom Layout concept. If you create some new custom slide layouts, the "Layout" property just returns ppLayoutCustom which isn't really helpful. John Wilson wrote: Does this work? Dim oLay As PpSlideLayout oLay = ActiveWindow.Selection.SlideRange(1).Layout ActiveWindow.Selection.SlideRange(1).Layout = oLay You maybe want to look at "Hands Off my Master" too http://www.pptalchemy.co.uk/HandOff.html |
#5
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Hi Luca, Glad you showed up again. This is re your earlier question about title masters. If there's no Title Slide layout present, you can do ActivePresentation.AddTitleMaster In earlier versions of PPT, this adds a new title master. In 2007 it adds a new Title Slide layout. Now assuming you already have another layout that you want to designate as the "Title Master", you could, I think, use the above, then copy all of the shapes from your layout to the new one and you're done. ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#6
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Thanks Shyam (and Luca) I missed the ref to 2007. I'll add that info to my
personal KB!! -- Amazing PPT Hints, Tips and Tutorials- http://www.PPTAlchemy.co.uk http://www.technologytrish.co.uk email john AT technologytrish.co.uk "Shyam Pillai" wrote: Luca, PPT 2007 requires a slightly different approach. All the change it needs is to get the reference to the custom layout and it can be reapplied. Take a look at this page. http://skp.mvps.org/2007/ppt002.htm -- Regards, Shyam Pillai Animation Carbon: Copy/Paste/Share animation libraries. www.animationcarbon.com "Luca Brasi" wrote in message ... John, thanks for your message but it don't work. Anyway, In my opinion the "Layout" property of the slide object shouldn't be used anymore in PP2007, as PP2007 uses the new Custom Layout concept. If you create some new custom slide layouts, the "Layout" property just returns ppLayoutCustom which isn't really helpful. John Wilson wrote: Does this work? Dim oLay As PpSlideLayout oLay = ActiveWindow.Selection.SlideRange(1).Layout ActiveWindow.Selection.SlideRange(1).Layout = oLay You maybe want to look at "Hands Off my Master" too http://www.pptalchemy.co.uk/HandOff.html |
#7
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Thanks for this info Steve.
Steve Rindsberg wrote: Hi Luca, Glad you showed up again. This is re your earlier question about title masters. If there's no Title Slide layout present, you can do ActivePresentation.AddTitleMaster In earlier versions of PPT, this adds a new title master. In 2007 it adds a new Title Slide layout. Now assuming you already have another layout that you want to designate as the "Title Master", you could, I think, use the above, then copy all of the shapes from your layout to the new one and you're done. ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#8
|
|||
|
|||
Reset slide layout in VBA (PP2007)
Thanks Shyam, but I know that I can reapply a layout to a slide. My
question was about doing a "Reset" of a slide (like using tab Home, group Slides, button Reset). In Office 2007 reapplying a layout and reseting a slide are two different functionalities. In short, resetting a slide does more than just reapplying a layout. For example it also sets back the formatting of placeholder shapes (e.g. font size). After some more testing, I'm almost certain that no "easy" Reset function in VBA exists (but maybe I missed something...?). I helped myself now by creating a procedure that copies the formatting of all placeholders in the custom layout to their respective shapes objects on the slide. Thanks anyway for all help. Shyam Pillai wrote: Luca, PPT 2007 requires a slightly different approach. All the change it needs is to get the reference to the custom layout and it can be reapplied. Take a look at this page. http://skp.mvps.org/2007/ppt002.htm |
Thread Tools | |
Display Modes | |
|
|