Placing an object at a specified layer

K

Keith Howell

I had a go at drawing a Kingfisher last night and found that when I wanted to
push a new shape into position in amongst existing ones, the only option I
had was to continually choose Draw/Order/Send Backward.

My suggestion is being able to "spot" and existing object and then choose to
feed the new object in behind it

(Kingfisher not qutie finished yet but at :
homepages.tesco.net/keithhowell/ArtGallery/Kingfisher.htm
)

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...aa4&dg=microsoft.public.word.drawing.graphics
 
K

Ken Johnson

Keith said:
I had a go at drawing a Kingfisher last night and found that when I wanted to
push a new shape into position in amongst existing ones, the only option I
had was to continually choose Draw/Order/Send Backward.

My suggestion is being able to "spot" and existing object and then choose to
feed the new object in behind it

Hi Keith,

Sounded to me like a problem that could be dealt with using a macro.

If you're not a macro hater then try this one out. All you have to do
is select both shapes, the one to be tucked under (click) and the
target shape (control click), then run the macro code (keyboard
shortcut to speed things up).

The code first checks that only two shapes have been selected. It then
uses an appropriate loop to repeatedly decrease the higher shape's
zorderposition value until it is directly below the other shape.

Public Sub TuckUnder()

If Application.Selection.ShapeRange.Count <> 2 Then
MsgBox _
"Please select two Shapes before running this macro."
Exit Sub
End If

Select Case Application.Selection.ShapeRange. _
Item(1).ZOrderPosition
Case Is > Application.Selection.ShapeRange. _
Item(2).ZOrderPosition
'Item (1) is higher
With Application.Selection.ShapeRange.Item(1)
While .ZOrderPosition > _
Application.Selection.ShapeRange.Item(2) _
.ZOrderPosition
.ZOrder msoSendBackward
Wend
End With

Case Else
'Item(2) is higher
With Application.Selection.ShapeRange.Item(2)
While .ZOrderPosition > _
Application.Selection.ShapeRange.Item(1) _
.ZOrderPosition
.ZOrder msoSendBackward
Wend
End With
End Select
End Sub

The best place to keep the code is with the Normal document template so
that it is accessible within all of your documents.

To get the code in place...

1. Copy it

2. Back in Word press Alt + F11 or go Tools|Macro|"Visual Basic Editor"
to get into the Visual Basic Editor

3. In the Visual Basic Editor go View|"Project Explorer" (the Project
Explorer was more than likely already visible, this just ensures its
visibility). The Project Explorer is a tree diagram in which you should
see an icon labelled "Normal". Click on Normal then go Insert|Module. A
new blank module will appear. Paste the code into this module.

4. Save then press Alt + F11 or go File|"Close and Return to Microsoft
Word" to get back to Word

5. For the macro to be used your Macro Security will need to be set to
Medium, which gives the user the choice of either "Enabling Macros" or
"Disabling Macros" every time the document is opened. If your Security
is High or Very High macros are automatically disabled. To change
Security to Medium go Tools|Macro|Security... then select Medium and
OK. After that you need to Close the document then reopen it. The
Security Warning dialog that then appears will need to have the "Enable
Macros" button clicked, otherwise the macro will not work.

Ken Johnson
 
B

Bob Buckland ?:-\)

Hi Keith,

Couldn't do too much with your Kingfisher (i.e. a picture rather than the Word .doc) itself, but, to add to Ken's reply, generally
when you're 'drawing' (working with autoshapes) as you insert it, it's the active drawing part so it's 'on top' to start. If you're
reusing basic shapes and have set a z-order for them (i.e. top, middle, bottom) that you're overlaying) you can store the lot of
them or individual ones as Autotext entries. When you insert a graphic from autotext it retains the properties it had when you
created the Autotext entry, but unfortunately that also includes the position of it on the page.

============I had a go at drawing a Kingfisher last night and found that when I wanted to
push a new shape into position in amongst existing ones, the only option I
had was to continually choose Draw/Order/Send Backward.

My suggestion is being able to "spot" and existing object and then choose to
feed the new object in behind it

(Kingfisher not qutie finished yet but at :
homepages.tesco.net/keithhowell/ArtGallery/Kingfisher.htm
) >>
 
K

Ken Johnson

Hi Keith,

one other option I forgot about was Ctrl + Y after you have done the
first SendBackwards, which repeats the action. Just keep repeating Crtl
+ Y until the Shape is at the desired ZOrderPosition.

Ken Johnson
 
K

Keith Howell

Thank you Ken & Bob for your replies. It's years since I used macros but I am
going to give it a go. If you have been followiing other threads you will
understand I am feeling a little bruised at the moment but the effort you
have put in to your replies is a tonic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top