> >* see Pg 94 in MS Office Automation for merging; will use the method getting a reference to the first >* cell, then the 3rd cell and then invoking .Merge() passing the second cell to merge with > >STORE loRow.Cells(1) TO loCell_1 >STORE loRow.Cells(3) TO loCell_3 > >* merge the cells >loCell_1.Merge(loCell_3) > >>
> >oCells.Merge() > >>
oWord.Selection.Cells.Merge() && preselected cells *or with oWord.ActiveDocument .Range(.Tables(1).Cell(1,2).Range.Start, .Tables(1).Cell(1,3).Range.End).Cells.merge endwith *or oWord.Activedocument.Table(2).Cells.Merge()Other than that, be carefull introducing object references to the pieces of the document. In most cases you can do it with single oWord object reference, like:
with oWord.ActiveDocument.Tables(2).Range .Cells(1).Merge(.Cells(3)) endwithOtherwise if you do not want Office applications remain sitting hidden after you close your application, then you need to release all objects properly, and in the proper sequence from child to parent.