[Table of Contents] [docx version]

VML Reference Material - VML

wrap (Text Wrapping)

This element specifies the type of text wrapping which should be allowed around the contents of this VML object.

If this element is omitted, then no text wrapping shall be performed (i.e. the object shall be presented in line with text).

[Example: Consider the following VML object:

<v:shape … >

<wd:wrap wd:type="square" />

The wrap element specifies how surrounding WordprocessingML document content shall wrap around the floating VML object - in this case, by wrapping around its extents in a square via the type attribute value of square. end example].

Parent Elements

arc6.1.2.1); curve6.1.2.3); group6.1.2.7); image6.1.2.10); line6.1.2.12); oval6.1.2.13); polyline6.1.2.15); rect6.1.2.16); roundrect6.1.2.17); shape6.1.2.19); shapetype6.1.2.20)

 

Attributes

Description

anchorx (Horizontal Positioning Base)

Specifies the base object from which the horizontal positioning of the object should be calculated.

 

A VML object may be horizontally positioned relative to:

The vertical edge of the page before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

The vertical edge of the text margin before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

The vertical edge of the text in the paragraph containing the VML object

The position of anchor for the floating VML object in the text.

 

If this attribute is omitted, then its value shall be assumed to be page.

 

[Example: Consider a VML object which should be positioned relative to the page edges, which would be specified as follows:

 

<wd:wrap wd:anchorx="page" wd:anchory="page" />

 

The anchorx attribute specifies that horizontal anchoring is relative to the edge of the page. end example]

 

The possible values for this attribute are defined by the ST_HorizontalAnchor simple type (§6.3.3.3).

anchory (Vertical Positioning Base)

Specifies the base object from which the vertical positioning of the object should be calculated.

 

A VML object may be vertically positioned relative to:

The horizontal top edge of the page

The horizontal edge of the top text margin before any runs of text

The horizontal top edge of line containing the VML object

The horizontal top edge of the paragraph containing the text.

 

If this attribute is omitted, then its value shall be assumed to be page.

 

[Example: Consider a VML object which should be positioned relative to the page edges, which would be specified as follows:

 

<wd:wrap wd:anchorx="page" wd:anchory="page" />

 

The anchory attribute specifies that horizontal anchoring is relative to the edge of the page. end example]

 

The possible values for this attribute are defined by the ST_VerticalAnchor simple type (§6.3.3.4).

side (Wrapping side)

Specifies how text shall wrap around the object's left and right sides.

 

[Example: Consider a floating DrawingML object which shall allow text to wrap around its left side only. This setting would be specified as follows:

 

<wd:wrap side="left" … />

 

The side attribute value of left specifies that text shall only wrap around the left side of the object. end example]

 

The possible values for this attribute are defined by the ST_WrapSide simple type (§6.3.3.5).

type (Wrapping type)

Specifies the type of wrapping - see the simple type definition for a description of each type.

 

[Example: Consider the following VML object:

 

<v:shape … >

<wd:wrap wd:type="topAndBottom" />

 

The wrap element specifies how surrounding WordprocessingML document content shall wrap around the floating VML object - in this case, by wrapping around its top and bottom extents via the type attribute value of topAndBottom. end example]

 

The possible values for this attribute are defined by the ST_WrapType simple type (§6.3.3.6).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Wrap">

   <attribute name="type" type="ST_WrapType" use="optional"/>

   <attribute name="side" type="ST_WrapSide" use="optional"/>

   <attribute name="anchorx" type="ST_HorizontalAnchor" use="optional"/>

   <attribute name="anchory" type="ST_VerticalAnchor" use="optional"/>

</complexType>