Unable to pass COM object of type 'System .__ ComObject' to interface type 'Microsoft.Office.Interop.PowerPoint.Presentation'

I am using the current MSWord 2003 and create a Powerpoint object and then apply the template. on these lines I am throwing an exception.

"Unable to pass COM object of type 'System .__ ComObject' to interface enter 'Microsoft.Office.Interop.PowerPoint.Presentation" This operation failed because a call to QueryInterface on the COM component for the interface with IID' {9149349D-5A91- 11CF-8700-00AA0060263B} 'failed due to the following error: This interface is not supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

    ((Microsoft.Office.Interop.PowerPoint.Presentation)objPresentation).Tags.Add("Carma DocSys~XML", m_Model.Document.get_Data.OuterXml);
    objMaster = ((Microsoft.Office.Interop.PowerPoint.Presentation)objPresentation).TitleMaster;

      

code

        object objApplication; //As Object ' PowerPoint.Application
        object objPresentation = new object();  // As Object ' PowerPoint.Presentation
        string strTemplate;//     As String

        objApplication = new Microsoft.Office.Interop.PowerPoint.Application();
       strTemplate = Convert.ToString(ndModel.GetAttribute("template"));
       objPresentation ((Microsoft.Office.Interop.PowerPoint.Application)objApplication).Presentations.Add();
      ((Microsoft.Office.Interop.PowerPoint.Presentation)objPresentation).ApplyTemplate(strTemplate);

      ((Microsoft.Office.Interop.PowerPoint.Presentation)objPresentation).Tags.Add("Carma DocSys~XML", m_Model.Document.get_Data.OuterXml);

   objMaster = ((Microsoft.Office.Interop.PowerPoint.Presentation)objPresentation).TitleMaster;

      

+3
c # vb.net c # -4.0


source to share


No one has answered this question yet

Check out similar questions:

eleven
Unable to start COM object - Microsoft Outlook and C #
6
Unable to start COM object of type "System .__ ComObject"
2
Unable to pass COM object of type "System .__ ComObject" with STAThread attribute
2
Cannot pass Com object of type "System .__ ComObject" to interface type VsRunningDocumentTable4
1
Cannot pass COM object of type 'System .__ ComObject' to interface type 'Microsoft.Office.Interop.Excel.Worksheets'
1
Cannot pass COM object of type 'System .__ ComObject' to interface type for IRTDUpdateEvent
0
Unable to use COM object of type
0
: "Unable to pass COM object of type" System .__ ComObject "to interface type
0
Cannot pass COM object of type 'System .__ ComObject' to interface type 'mshtml.HTMLElementCollection'
-1
Unable to start COM object of type "System .__ ComObject"



All Articles
Loading...
X
Show
Funny
Dev
Pics