View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
row wang row wang is offline
external usenet poster
 
Posts: 2
Default the excel calling msquery question throught DDE

Throw the Type mismatch Exception (Abnormal from HRESULT: 0x80020005
(DISP_E_TYPEMISMATCH)) when the excel the application called the Ms Query.
exe file .

Codes:
Microsoft.Office.Interop.Excel.Application m_excelComApp.GetExcelApp()

{

.......

}

try
{
m_excelComApp.GetExcelApp().DDEInitiate("MsQry32", "Query1");
}
catch (Exception ee)
{
MessageBox.Show(ee.Data + ee.Source + ee.Message);
}