In Windows form Application Facing this exception System.Runtime.InteropServices.COMException (0x800A03EC): Cannot insert object.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Microsoft.Office.Interop.Excel.Shapes.AddOLEObject(Object ClassType, Object Filename, Object Link, Object DisplayAsIcon, Object IconFileName, Object IconIndex, Object IconLabel, Object Left, Object Top, Object Width, Object Height)
Using:Office 365 and OS windows 10Application:Windows ApplicationTarget framework: .NET Framework 4.5Reference: Microsoft.Office.Interop.Excel (version: 14.0.0.0)
I write a function in window application that add pdf file into Excel sheet.But I got this error System.Runtime.InteropServices.COMException (0x800A03EC): Cannot insert objectat method AddOLEObject() .