描述:
IDispatch *pTabels;
{
VARIANT vrTables;
VariantInit(&vrTables);
AutoWrap(DISPATCH_PROPERTYGET, &vrTables, pDoc, L"Tables", 0);
pTabels = vrTables.pdispVal;
}
// Get the count of the Tables and show it out
{
VARIANT vrCount;
VariantInit(&vrCount);
AutoWrap(DISPATCH_PROPERTYGET, &vrCount, pTabels, L"Count", 0);
CString strCount;
strCount.Format("The Tabels Count is %d\n", vrCount.intVal);
MessageBox(strCount);
}
// Get the tables's Rows
// 此处出错............................................................
IDispatch *pTableItem;
{
VARIANT vrTable;
VariantInit(&vrTable);
AutoWrap(DISPATCH_PROPERTYGET, &vrTable, pTabels, L"item", 1);
pTableItem = vrTable.pdispVal;
}
//....................................................................
要求读取所有的表格(Table)来.