Something like this should work...void GetWksList(StringArray &sa)
{
Folder fld = Project.ActiveFolder();
foreach(PageBase pg in fld.Pages)
if( pg.GetType() == EXIST_WKS )
sa.Add(pg.GetName());
}
void MyWksFunction()
{
StringArray sa;
GetWksList(sa);
Worksheet wks;
for(int i=0;i<sa.GetSize();i++)
{
wks.Attach(sa[i]);
// manipulation code goes here
}
}
...Oops, the GetWksList function above only gets the worksheets in the active folder. Use this to get all worksheets in the project...void GetWksList(StringArray &sa)
{
foreach(PageBase pg in Project.Pages)
if( pg.GetType() == EXIST_WKS )
sa.Add(pg.GetName());
}
Mike Buess
Origin WebRing Member
Edited by - Mike Buess on 10/11/2004 2:28:56 PM