Re: Layering Objects
From: Steve Rindsberg (abuse_at_localhost.com)
Date: 02/01/05
- Next message: Steve Rindsberg: "Re: How do I setup a PowerPoint back ground to display on a 16:9 Plas."
- Previous message: Steve Rindsberg: "Re: VBA macro for making a text box"
- In reply to: SteveK: "Layering Objects"
- Next in thread: SteveK: "Re: Layering Objects"
- Reply: SteveK: "Re: Layering Objects"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 22:09:34 EST
In article <e3nuWu$BFHA.2016@TK2MSFTNGP15.phx.gbl>, SteveK wrote:
> On each slide I am bringing into PP 2003 a few pictures, a few arrows, and a
> few text boxes. In order from front to back I want the pictures to be on
> the bottom, then the arrows above them and then the text boxes to be on top
> so that they can cover the end of the arrow and cover the picture. I have
> recorded macros to bring the objects in and I have recorded these commands
> to set the order when the objects come in:
>
> For the text box that I want to stay on the top I have:
>
> ActiveWindow.Selection.ShapeRange.ZOrder msoBringToFront
>
> For the arrow that would be under the text box but above the picture I have:
>
> ActiveWindow.Selection.ShapeRange.ZOrder msoBringToFront
> ActiveWindow.Selection.ShapeRange.ZOrder msoSendBackward
>
> For the picture I have;
>
> ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
>
> This only works if I bring the picture in first, then the arrow, then the
> text box.
>
> If I bring in the picture first, then the text box, then the arrow - the
> arrow sits on top of the text box.
>
> Is there any way to control this so that I always get the priority of layers
> that I want, not dependent on when the objects were placed?
There are different ways of going about it. If you give the shapes names when
you bring them in, it makes them easier to grab and work with later. Post the
code you use to add the shapes and we can help with that.
Once they each have names, all you need to do is bring them to the front in
reverse order:
ActivePresentation.Slides(42).Shapes("Picture").Zorder msoBringToFront
ActivePresentation.Slides(42).Shapes("Arrow").Zorder msoBringToFront
ActivePresentation.Slides(42).Shapes("TextBox").Zorder msoBringToFront
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
- Next message: Steve Rindsberg: "Re: How do I setup a PowerPoint back ground to display on a 16:9 Plas."
- Previous message: Steve Rindsberg: "Re: VBA macro for making a text box"
- In reply to: SteveK: "Layering Objects"
- Next in thread: SteveK: "Re: Layering Objects"
- Reply: SteveK: "Re: Layering Objects"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|