Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Add Chart is raising exception

$
0
0
Hi,

I was able to add shapes , Table etc.
When it comes to AddChart (as shown in code below) it raises exception as shown below.

I am using Office 2013. on Windows 7.
What might be the problem ?

Code:
---snip---
        slide = presentation.Slides.Add(1, PpSlideLayout.ppLayoutChartAndText);
        slide.Shapes.AddChart(XlChartType.xlLine);
---snip---

Stack Trace
at NetOffice.Invoker.MethodReturn(COMObject comObject, String name, Object[] paramsArray)
at NetOffice.PowerPointApi.Shapes.AddChart(XlChartType type)
at MyAssembly.Form1.MakePPT(String filename) in c:\work\ACN\App\DV\MyAssembly\Form1.cs:line 74
at MyAssembly.Form1.Form1_Load(Object sender, EventArgs e) in c:\work\ACN\App\DV\MyAssembly\Form1.cs:line 31

Inner Exception

{"Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"}

Regards
Tejasvi

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>