Export (0) Print
Expand All
Expand Minimize

AddRow method

AddRow method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

http://msdn.microsoft.com/en-us/library/aa140205(v=office.10) See also         http://msdn.microsoft.com/en-us/library/aa155603(v=office.10) Example         http://msdn.microsoft.com/en-us/library/aa164278(v=office.10) Applies to

Adds a row to a ShapeSheet section at a specified position.

Version added

2.0

Syntax

retVal = object.AddRow (section, row, tag)

retVal

Integer. The row number of the row that was added.

object

Required. An expression that returns a Shape object.

section

Required Integer. The section in which to add the row.

row

Required Integer. The position at which to add the row.

tag

Required Integer. The type of row to add.

Remarks

If the ShapeSheet section does not already exist, it is created with a blank row. New cells in new rows are initialized with default formulas, if applicable. Otherwise, a program must include statements to set the formulas for the new cells. An error is generated if the new row cannot be added.

The row constants declared by the Visio type library serve as base positions at which a section's rows begin. Add offsets to these constants to specify the first row and beyond, for example, visRowFirst+0, visRowFirst+1, and so on. To add rows at the end of a section, pass the constant visRowLast for the row argument. The value returned is the actual row index.

The tag argument specifies the type of row to add. Pass zero (0) as the tag argument to generate a section's default row type. Explicit tags are useful when adding rows to http://msdn.microsoft.com/en-us/library/aa200706(v=office.10) Geometry, http://msdn.microsoft.com/en-us/library/aa200630(v=office.10) Connection Points, and http://msdn.microsoft.com/en-us/library/aa200641(v=office.10) Controls sections. See the RowType property for descriptions of valid row types for these sections. Passing an invalid row type generates an error.

If you try to add a row to a http://msdn.microsoft.com/en-us/library/aa200465(v=office.10) Character, http://msdn.microsoft.com/en-us/library/aa160179(v=office.10) Tabs, or http://msdn.microsoft.com/en-us/library/aa159812(v=office.10) Paragraph section, an error occurs.

The AddRow method cannot add named rows; an error occurs if the section contains named rows or can hold only named rows. To add named rows, use the AddNamedRow method.

The Visio type library declares row constants prefixed with visRow in VisRowIndices. These are also listed in the AddRows method topic.

Constants for rows in the Geometry, Connection Points and Controls sections are prefixed with visTag and declared by the type library in VisRowTags. To see a list of these constants, see the RowType property.

Show:
© 2014 Microsoft