Показать сообщение отдельно
Старый 08.11.2006, 11:43   #5  
Beast-L is offline
Beast-L
Участник
Аватар для Beast-L
 
104 / 21 (1) +++
Регистрация: 20.10.2006
Адрес: Киев
Зделал вот так:

Добавил метод в класс ComWordDocument_RU
X++:
void tableMergeCellsInsert(int _table, int _row, int _startCol, int _cellsCount, AnyType _value)
{
    COM         cell;
    COM         cells;
    COM         selection;
    COM         range;
    COM         tables;
    COM         table;
    COM         document;
    ; // end of variables declaration

    try
    {
        document = m_comApplication.activedocument();
        tables = document.tables();
        table = tables.item(_table);
        cell = table.cell(_Row, _startCol);
        cell.select();
        selection = m_comApplication.selection();
        selection.moveright(1, _cellsCount, 1);
        cells = selection.cells();
        cells.merge();
        selection.typeText(_value);
    }
    catch(exception::Error)
    {
        checkFailed(strFmt("@SYS19306", funcName()));
    }
}

Последний раз редактировалось Beast-L; 08.11.2006 в 11:51.