void CAutoProjectDlg::OnRun()
{
_Application app; // app is the Excel _Application object
// Start Excel and get Application object...
if(!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Couldn't start Excel.");
}
else
{
//Make Excel Visible and display a message
app.SetVisible(TRUE);
AfxMessageBox ("Excel is Running!");
}
}