Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possibble to link a c# winform to a microsoft power point document, by the click of a button or a link label.if it is, need help on how to do it. tanx in advance
Posted

1 solution

C#
using PowerPoint = Microsoft.Office.Interop.PowerPoint;

PowerPoint.Application powerpnt;
PowerPoint.Presentations objpresentation;



C#
string powerpointfilename;
powerpointfilename= @"mypowerpoint.ppt";
powerpnt= new PowerPoint.ApplicationClass();
// Show PowerPoint to the user.
powerpnt.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;

objpresentation= powerpnt.Presentations ;

//open the presentation
 objpresentation.Open ( powerpointfilename,MsoTriState.msoFalse ,
MsoTriState.msoTrue ,MsoTriState.msoTrue );



check if its helps
 
Share this answer
 
Comments
Ese ochuko 6-Sep-12 18:09pm    
Thanks for your response. Am using visual studio 2010 ultimate and its not regognising the using power point and every other stuff is there any special namespace i need to add first or anything i need to enable bfore i can run this code?.thanks
Ese ochuko 8-Sep-12 17:44pm    
Hi please is there any special name space i should add.i have added the microsoft.office.interop.powerpoint but it still nt working is not accepting 'microsoft.office.core.MsoTriState'

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