Merges cells in a table.
Supported platforms: Windows only
VBA:
object.MergeCells minRow, maxRow, minCol, maxCol
Type: Table
The object this method applies to.
Access: Input-only
Type: Long
The zero-based lower bound of a row index.
Access: Input-only
Type: Long
The zero-based upper bound of a row index.
Access: Input-only
Type: Long
The zero-based lower bound of a column index.
Access: Input-only
Type: Long
The zero-based upper bound of a column index.
No return value.
This method merges a rectangular region of cells. The total number of cells to be merged is equal to (maxRow - minRow + 1) * (maxCol - minCol + 1).
VBA:
Sub Example_MergeCells() Dim MyModelSpace As AcadModelSpace Set MyModelSpace = ThisDrawing.ModelSpace Dim pt(2) As Double Dim MyTable As AcadTable Set MyTable = MyModelSpace.AddTable(pt, 5, 5, 10, 30) Call MyTable.MergeCells(2, 3, 2, 3) MsgBox "The cells have been merged appropriately." ZoomExtents End Sub
Visual LISP:
(vl-load-com) (defun c:Example_MergeCells() (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq pt (vlax-3d-point 0 0 0)) (setq modelSpace (vla-get-ModelSpace doc)) (setq MyTable (vla-AddTable modelSpace pt 5 5 10 30)) (vla-MergeCells MyTable 2 3 2 3) (alert "The cells have been merged appropriately.") (vla-ZoomExtents acadObj) )