[Table of Contents] [docx version]

VML Reference Material - VML


VML is a language for defining graphical objects in cases where DrawingML does not apply, such as text boxes and shapes in WordprocessingML documents and comments and controls in SpreadsheetML documents. This namespace provides the base elements and attributes for defining shape primitives. Other VML namespaces define elements that layer on information beyond the baseline graphical definition. To maintain backward compatibility, all VML namespaces defined in this specification maintain the legacy namespace structure already used by millions of documents.

[Note: The VML format is a legacy format originally introduced with Office 2000 and is included and fully defined in this Standard for backwards compatibility reasons. The DrawingML format is a newer and richer format created with the goal of eventually replacing any uses of VML in the Office Open XML formats. VML should be considered a deprecated format included in Office Open XML for legacy reasons only and new applications that need a file format for drawings are strongly encouraged to use preferentially DrawingML .end note]

[Example: Assume the following shapes exist in a WordprocessingML document:

The drawing consists of four shapes. The arrows are specified by extending the shape type base definition in the shapetype element. Each shape representing an arrow references the shapetype it is extending via its type attribute.

<v:shapetype id="_x0000_t32" coordsize="21600,21600" o:spt="32" o:oned="t"

path="m,l21600,21600e" filled="f">

<v:path arrowok="t" fillok="f" o:connecttype="none"/>

<o:lock v:ext="edit" shapetype="t"/>



<v:shape id="_x0000_s1030" type="#_x0000_t32" style="position:absolute;left:0;


z-index:251661312" o:connectortype="straight">

<v:stroke endarrow="block"/>



<v:shape id="_x0000_s1029" type="#_x0000_t32" style="position:absolute;left:0;


z-index:251660288" o:connectortype="straight">

<v:stroke endarrow="block"/>


The rounded rectangles use the VML roundrect element.

<v:roundrect id="_x0000_s1028" style="position:absolute;left:0;


z-index:251659264" arcsize="10923f"/>


<v:roundrect id="_x0000_s1027" style="position:absolute;left:0;


height:42pt;z-index:251658240" arcsize="10923f"/>

end example]

Note that, throughout VML, numeric values that are allowed to take units may be specified in: cm (centimeters), mm (millimeters), in (inches), pt (points), pc (picas), px (pixels).