Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
i am working on Office PowerPoint 2007 using c#. i want to open the power point document, so i have done some code for the same. but am facing one problem. i have attached code spinet as follow.And i also add the reference of `Microsoft.Office.Interop.PowerPoint.dll


C#
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
            ppApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
            Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;
            Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(@"D:\Office\temp.pptx", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse,
            Microsoft.Office.Core.MsoTriState.msoTrue);


But i got error message like this


The type 'Microsoft.Office.Core.MsoTriState' is defined in an assembly that is not referenced. You must add a reference to assembly 'office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.


i try to search this error on google but i can't get proper way to solve this error.

How can i solve it ?
Posted
Updated 29-Sep-13 19:10pm
v3

1 solution

In the folder where you found Microsoft.Office.Interop.PowerPoint.dll, there is also a office.dll. Add a reference to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900