Re: Layering Objects

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Steve Rindsberg (abuse_at_localhost.com)
Date: 02/01/05


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
================================================



Relevant Pages

  • Layering Objects
    ... few text boxes. ... For the arrow that would be under the text box but above the picture I have: ... If I bring in the picture first, then the text box, then the arrow - the ...
    (microsoft.public.powerpoint)
  • Re: Put in arrow over picture to point to object
    ... I tried the arrow and it works great. ... The text box idea worked but it takes up too much room so I inserts JPEG ... margin if you give the Header/Footer paragraph a negative indent). ... an arrow over the picture to point to part of the picture. ...
    (microsoft.public.word.docmanagement)
  • Re: Show a cell as drop-down even if cell not selected
    ... I was able to work around this by creating a picture file of the down ... arrow with the exact size and shape. ... appears when the cell is selected. ... This will prevent you from selecting the picture instead of the down ...
    (microsoft.public.excel.misc)
  • Re: e-mail attachments
    ... open them and its a picture or image. ... often a left and right arrow to go to the next image. ... "At the bottom of the e-mail there is often a left and right ... browsing through with the arrows are other pictures in a temporary folder. ...
    (microsoft.public.windowsxp.basics)
  • Re: char** function parameters
    ... A picture might also help: ... but this pointer is not stored in memory anywhere, ... You need to make sure the arrow points in turn to some other thing ...
    (comp.lang.c)