If you have the handle to the application, you can get the collection of Workbooks and loop through the list and look for the right workbook by the name. Something like:
//Get the Workbooks collection from Application
Excel_GetProperty (hExcelApp, NULL, Excel_AppWorkbooks, CAVT_OBJHANDLE, &hWorkbooks);
//Get the number of Workbooks open
Excel_GetProperty (hWorkbooks, NULL, Excel_WorkbooksCount, CAVT_LONG, &numWorkbooks);
//Loop through WorkBooks and check name.
for(i=1;i<=numWorkbooks;i++)
{
Excel_WorkbooksItem (hWorkbooks, NULL, CA_VariantInt(i), hCurrentWorkbook);
Excel_GetProperty (hCurrentWorkbook, NULL, Excel_WorkbookName, CAVT_CSTRING, WorkbookName);
//Check name to see if it's the right Workbook.
...
}
Hope that hel
ps,
Chris Matthews
National Instruments