Board index » delphi » word com appliction problem

word com appliction problem

I use w2k interface in my application, there are places need to split a cell
dynamically , and then fill some string in each result cell, the source as

    OleVariant CI = ColCount ;
    OleVariant CJ = 1;
    tableItem = DM->WordDocument->Tables->Item(4);

    for ( i = 0 ; i < ColCount;i++) {
        cell = tableItem->Range->Cells->Item(Pos[TableItemIndex][0] +1  +
        FieldValue = pRow->Strings[i];
        cell->Range->Text  = StringToOleStr(FieldValue);

this is correctly run under win98, but always cause a error msg in NT or
win2000, It seems the split work has not accomplished when i try to get
tableitem->range interface.

how to resolve this problem?thanks for any help.



Re:word com appliction problem


> but always cause a error msg in NT or win2000

What error message, when exactly does it appear?

You appear to have posted this to the wrong newsgroup section. Your
code appears to be C++ Builder code in which case you should be
posting into one of the CPPBUILDER.* sections.

This section is for the pre-Builder compilers and by posting here you
are targetting developers who are mostly not using Builder.

Andrue Cope
[Bicester, UK]

Other Threads