11-10-2005 10:56 AM
11-11-2005 09:02 AM
Hello,
You can try to use the procedure:
/********************************************************************************/
int WORDTABLE_ReadFromCell(CAObjHandle tableHandle, int numRow, int numCol, char text[])
{
CAObjHandle appHandleL = 0;
CAObjHandle currSelHandleL = 0;
WordObj_Cell cellHandleL;
WordObj_Rows rowsHandle;
WordObj_Cell cell;
HRESULT error = S_OK;
char *ptr=NULL;
errChk (Word_TableCell (tableHandle, NULL, numRow,numCol, &cellHandleL));
errChk (Word_CellSelect (cellHandleL, NULL));
errChk (Word_GetProperty (tableHandle, NULL, Word_TableApplication,CAVT_OBJHANDLE, &appHandleL));
errChk (Word_GetProperty (appHandleL, NULL, Word_ApplicationSelection, CAVT_OBJHANDLE, &currSelHandleL));
errChk (Word_GetProperty (currSelHandleL, NULL, Word_RangeText, CAVT_CSTRING, &ptr));
strcpy(text,ptr);
text[strlen(text)-2] = '\0';
CA_FreeMemory(ptr);
ptr = NULL;
Error:
CA_DiscardObjHandle(currSelHandleL);
CA_DiscardObjHandle(appHandleL);
return error;
}
/***********************************************************************************************/
Best regards,
Janusz
11-18-2005 04:37 PM
Janusz,
Thank you!
That worked perfectly!
Mike