Problem in using Chart.ApplyCustomType for Excel 2007
Hi,
I have been using following code :- _Chart chart = chartobject.GetChart(); if(3 == m_numAxis) { CString strTemp = _T("Lines on 2 Axes"); // code for creating Lines on the 2 vertical axes of the chart VARIANT var; var.vt = VT_BSTR; var.bstrVal = strTemp.AllocSysString(); chart.ApplyCustomType(21, var); VariantClear(&var); } else chart.SetChartType(74); It is working properly if Office 2003 is installed but for Excel 2007, ApplyCustomType throws an COleDispatch exception. I searched for it on the msdn and also on the net but could not find any sol. Could you provide me the links where I can get much information for chart object and its functions. Thanks in advance for providing an early solution. |
Problem in using Chart.ApplyCustomType for Excel 2007
I have been waiting for reply for last 4 days, but it is disgusting to see
there is not even a single reply by anyone. Is there nobody who can help me ? "Sumit" wrote: Hi, I have been using following code :- _Chart chart = chartobject.GetChart(); if(3 == m_numAxis) { CString strTemp = _T("Lines on 2 Axes"); // code for creating Lines on the 2 vertical axes of the chart VARIANT var; var.vt = VT_BSTR; var.bstrVal = strTemp.AllocSysString(); chart.ApplyCustomType(21, var); VariantClear(&var); } else chart.SetChartType(74); It is working properly if Office 2003 is installed but for Excel 2007, ApplyCustomType throws an COleDispatch exception. I searched for it on the msdn and also on the net but could not find any sol. Could you provide me the links where I can get much information for chart object and its functions. Thanks in advance for providing an early solution. |
All times are GMT +1. The time now is 08:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com