Specifies how the cell is merged with other cells vertically.
[Visual Basic]Public Property VerticalMerge As
CellMerge [C#]public
CellMerge VerticalMerge {get; set;}
Remarks
Cells can only be merged vertically if their left and right boundaries are identical.
When cells are vertically merged, the display areas of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell and all other vertically merged cells must be empty.
Example
Creates a table with two columns with cells merged vertically in the first column.
[C#]
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertCell();
builder.CellFormat.VerticalMerge = CellMerge.First;
builder.Write("Text in the merged cells.");
builder.InsertCell();
builder.CellFormat.VerticalMerge = CellMerge.None;
builder.Write("Text in one cell");
builder.EndRow();
builder.InsertCell();
// This cell is vertically merged to the cell above and should be empty.
builder.CellFormat.VerticalMerge = CellMerge.Previous;
builder.InsertCell();
builder.CellFormat.VerticalMerge = CellMerge.None;
builder.Write("Text in another cell");
builder.EndRow();[Visual Basic]
Dim doc As Document = New Document()
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
builder.InsertCell()
builder.CellFormat.VerticalMerge = CellMerge.First
builder.Write("Text in the merged cells.")
builder.InsertCell()
builder.CellFormat.VerticalMerge = CellMerge.None
builder.Write("Text in one cell")
builder.EndRow()
builder.InsertCell()
' This cell is vertically merged to the cell above and should be empty.
builder.CellFormat.VerticalMerge = CellMerge.Previous
builder.InsertCell()
builder.CellFormat.VerticalMerge = CellMerge.None
builder.Write("Text in another cell")
builder.EndRow()See Also
CellFormat Class | Aspose.Words.Tables Namespace | HorizontalMerge