New Guides object in PowerPoint 2013
2013 has introduced a long requested feature - object model support for guides. You can now add, position and delete guides. The guides are available on the Presentation, CustomLayout and SlideMaster objects.
Each object has it's own collection of guides. Deleting the guides on the presentation object does not delete the guides on the SlideMaster or CustomLayouts. You will need to enumerate through all the objects to clear out all the guides.
Another thing to note is that if you create a guide at a location that already has a guide then a new guide will not be created. Instead PowerPoint will return a reference to the guide at that location and all edits performed will apply to that guide.
Supported versions: PowerPoint 2013
' -------------------------------------------------------------------------------- ' Copyright ©1999-2018, Shyam Pillai, All Rights Reserved. ' -------------------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format. ' --------------------------------------------------------------------------------Sub InsertNewGuides() With ActivePresentation'Position is in points just as shapes |
Copyright 1999-2018 (c) Shyam Pillai. All rights reserved.