By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

Open Powerpoint Presentation from C# Window Form.

P: n/a

I am trying to open a 3 powerpoint presentation simultaneously afte
each other without interruption, the operator of the application doe
not need to notice anything or interfere in the operation of th
transition between the 3 presentations.

Let us say I have three powerpoint presentation Presentation 1
Presentation 2, and Presentation 3.

I like to fire them from a window form on the click event of a butto
on the form. The sequence of processing should be Presentation
followed by Presentation 2 and lastly Presentation 3. without th
operator having to search and double click on each presentation.

I wand to do this in C#.
Many Thank

--
Josep
-----------------------------------------------------------------------
Joseph's Profile: http://www.msusenet.com/member.php?userid=250
View this thread: http://www.msusenet.com/t-187059175

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

By the way, I tried using
Process.Start(@"Test1.pps");
Process.Start(@"Test2.pps");

it works but it flicks between the two powerpoint presentation,
wanted a solution that is very smooth and does not tell that they ar
separate files. I know the concept but I can put my hands on th
syntax.

1. Create a powerpoint object.
2. Open Test1.pps
3. Open Test2.pps
4. Quite the application.

This way it will not flick between Test1 and Test2

Thanks in advance

--
Josep
-----------------------------------------------------------------------
Joseph's Profile: http://www.msusenet.com/member.php?userid=250
View this thread: http://www.msusenet.com/t-187059175

Nov 17 '05 #2

P: n/a
Hi Joseph
The following might be what you are looking for

Add a reference to the powerpoint object library (make sure you have the
interops installed)

add the directive;

using PowerPoint = Microsoft.Office.Interop.PowerPoint;

then the following code

PowerPoint.Application oPPT;
PowerPoint.Presentations objPresSet;

//the location of your powerpoint presentation
string strPres;
strPres = @"mpPres.ppt";
//Create an instance of PowerPoint.
oPPT = new PowerPoint.ApplicationClass();
// Show PowerPoint to the user.
oPPT.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;

objPresSet = oPPT.Presentations ;

//open the presentation
objPres = objPresSet.Open ( strPres,MsoTriState.msoFalse ,
MsoTriState.msoTrue ,MsoTriState.msoTrue );

hope it helps

regards

Ronnie


"Joseph" wrote:

By the way, I tried using
Process.Start(@"Test1.pps");
Process.Start(@"Test2.pps");

it works but it flicks between the two powerpoint presentation, I
wanted a solution that is very smooth and does not tell that they are
separate files. I know the concept but I can put my hands on the
syntax.

1. Create a powerpoint object.
2. Open Test1.pps
3. Open Test2.pps
4. Quite the application.

This way it will not flick between Test1 and Test2

Thanks in advance.
--
Joseph
------------------------------------------------------------------------
Joseph's Profile: http://www.msusenet.com/member.php?userid=2505
View this thread: http://www.msusenet.com/t-1870591750

Nov 17 '05 #3

P: n/a

Hi Roonie
Thanks so much for your help, I actually got stuck on the first line.
can not get the interops installed for office 2000, it is only avaliabl
for office 2003. is there another way of getting interop for offic
2000.

Thanks
Josep

--
Josep
-----------------------------------------------------------------------
Joseph's Profile: http://www.msusenet.com/member.php?userid=250
View this thread: http://www.msusenet.com/t-187059175

Nov 17 '05 #4

P: n/a
Hi Joseph

you should be able to browse to the powepoint library using add refererence,
and let the IDE do the typelib export.

regards

ronnie

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.