Hi,
I have tried the following code, and it works.
CoInitialize(NULL);
{
OriginApp::IOApplicationPtr pOrigin = NULL;
pOrigin.CreateInstance(__uuidof(ApplicationSI));
pOrigin->Visible = OriginApp::MAINWND_VISIBLE::MAINWND_SHOW;
OriginApp::WorksheetPagesPtr wksPagesPtr;
OriginApp::WorksheetPagePtr wksPagePtr;
wksPagesPtr = pOrigin->WorksheetPages;
int nCount = wksPagesPtr->Count;
for(long i = 0; i < wksPagesPtr->GetCount(); i++)
{
wksPagePtr = wksPagesPtr->GetItem(i);
cout << wksPagePtr->GetName();
}
}
CoUninitialize();
Penn