none
What to use instead of z order for 2003 Word Document? RRS feed

  • Question

  • Hi

    I am currently trying to get the ordering of shapes for Word 2003 format. If there are two over lapping shapes, I an unable to decide which shape is on top of the other.

    Thanks,

    Amit

    Wednesday, February 5, 2014 11:29 AM

Answers

  • Hi,

    According to your description, you want to know the position of  the specific shape in the z-order. You can use Shape.ZOrderPosition to achieve the goal.

    This feature is supported in Word 2007 but I can’t find any Object model reference for Word 2003. And since I also don’t have the environment, I suggest you test it in Word 2003 to see whether it is supported.

    In addition, since the Office 2003 will end support at April 8th, 2014, I suggest you migrate it to latest version. (refer to http://www.microsoft.com/en-us/windows/enterprise/endofsupport.aspx)

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 6, 2014 7:54 AM
    Moderator
  • For a selected shape in Word 2003, you can use:
    Selection.ShapeRange.ZOrder msoBringToFront

    Other ZOrder positions include:
    msoBringForward
    msoBringInFrontOfText
    msoBringToFront
    msoSendBackward
    msoSendBehindText
    msoSendToBack

    And, if you want to find the Zorder position of a series of shapes, you can use code like:

    Dim Shp As Shape
    For Each Shp In ActiveDocument.Shapes
      MsgBox Shp.ZOrderPosition
    Next

    Finally, to change the Zorder position you can use code like the following (from the VBA help file):

    Set myDocument = ActiveDocument
    With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)
        While .ZOrderPosition > 2
            .ZOrder msoSendBackward
        Wend
    End With


    Cheers
    Paul Edstein
    [MS MVP - Word]


    Thursday, February 6, 2014 3:37 PM

All replies

  • I see that for Word 2007 we get z-order. Is there any such property for Word 2003 documents.
    Wednesday, February 5, 2014 11:31 AM
  • Hi,

    According to your description, you want to know the position of  the specific shape in the z-order. You can use Shape.ZOrderPosition to achieve the goal.

    This feature is supported in Word 2007 but I can’t find any Object model reference for Word 2003. And since I also don’t have the environment, I suggest you test it in Word 2003 to see whether it is supported.

    In addition, since the Office 2003 will end support at April 8th, 2014, I suggest you migrate it to latest version. (refer to http://www.microsoft.com/en-us/windows/enterprise/endofsupport.aspx)

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 6, 2014 7:54 AM
    Moderator
  • For a selected shape in Word 2003, you can use:
    Selection.ShapeRange.ZOrder msoBringToFront

    Other ZOrder positions include:
    msoBringForward
    msoBringInFrontOfText
    msoBringToFront
    msoSendBackward
    msoSendBehindText
    msoSendToBack

    And, if you want to find the Zorder position of a series of shapes, you can use code like:

    Dim Shp As Shape
    For Each Shp In ActiveDocument.Shapes
      MsgBox Shp.ZOrderPosition
    Next

    Finally, to change the Zorder position you can use code like the following (from the VBA help file):

    Set myDocument = ActiveDocument
    With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)
        While .ZOrderPosition > 2
            .ZOrder msoSendBackward
        Wend
    End With


    Cheers
    Paul Edstein
    [MS MVP - Word]


    Thursday, February 6, 2014 3:37 PM