Objectmix
Tags Register Mark Forums Read

DsoFramer - Microsoft.Office.Interop.PowerPoint : DOTNET

This is a discussion on DsoFramer - Microsoft.Office.Interop.PowerPoint within the DOTNET forums in Framework and Interface Programming category; Hi, I try to control a PowerPoint Slideshow with c#. I have a dsoFramer Control (axFramerControl) and can load and view a powerpoint presentation within my form. When I try to control the presentation using Microsoft.Office.Interop.PowerPoint I get a Cast Exception. Here is some code to understand my problem. //Load presentation into control axFramerControl.Open(loc); //try to get the presentation for controling. Produce a Invalid CastException. Microsoft.Office.Interop.PowerPoint.PresentationClass myPres = (Microsoft.Office.Interop.PowerPoint.PresentationClass)axFramerControl.ActiveDocument; When I try this with word I have no Problems Microsoft.Office.Interop.Word.DocumentClass myDoc = (Microsoft.Office.Interop.Word.DocumentClass)axFramerControl.ActiveDocument; I hope there is someone who can tell how to get the presentation. Mathias...


Object Mix > Framework and Interface Programming > DOTNET > DsoFramer - Microsoft.Office.Interop.PowerPoint

DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items

Reply

 

LinkBack Thread Tools
  #1  
Old 11-08-2007, 05:52 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default DsoFramer - Microsoft.Office.Interop.PowerPoint

Hi,

I try to control a PowerPoint Slideshow with c#.
I have a dsoFramer Control (axFramerControl) and can load and view a
powerpoint presentation within my form. When I try to control the
presentation using Microsoft.Office.Interop.PowerPoint I get a Cast
Exception.
Here is some code to understand my problem.

//Load presentation into control
axFramerControl.Open(loc);
//try to get the presentation for controling. Produce a Invalid
CastException.
Microsoft.Office.Interop.PowerPoint.PresentationClass myPres =
(Microsoft.Office.Interop.PowerPoint.PresentationClass)axFramerControl.ActiveDocument;

When I try this with word I have no Problems
Microsoft.Office.Interop.Word.DocumentClass myDoc =
(Microsoft.Office.Interop.Word.DocumentClass)axFramerControl.ActiveDocument;

I hope there is someone who can tell how to get the presentation.

Mathias

  #2  
Old 11-08-2007, 07:08 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default DsoFramer - Microsoft.Office.Interop.PowerPoint

Hi

I try to control a powerpoint slide show inside a dsoFramer Control
(axFramerControl).
When I press the F5 key, the slides are shown inside my control. When I
try to automate it, the slides are shown in full screen, outside my control.

Here is a part of my code:

Object refmissing = System.Reflection.Missing.Value;
object loc = strFileName;
//open ppt in control - works
axFramerControl.Open(loc, true, refmissing, refmissing, refmissing);
//get reference to ppt inside control
Microsoft.Office.Interop.PowerPoint._Presentation myPres =
(Microsoft.Office.Interop.PowerPoint.Presentation)axFramerControl.ActiveDocument;
//start presentation - does not worg (fullscreen insted of control)
myPres.SlideShowSettings.Run();

I hope someone can help me.

Mathias
Reply

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
ActiveX and Microsoft.Office.Interop.Word usenet DOTNET 1 09-03-2007 09:21 AM
Inconsistent behaviour of Office interop application for Powerpoint usenet DOTNET 0 06-02-2007 05:01 AM
DSOFramer expertise? Seeing Office events when hosted by DSOFramer? usenet DOTNET 0 07-27-2006 07:30 AM
Microsoft Office.Interop Excel Error usenet DOTNET 1 07-07-2006 10:07 AM
problem with Microsoft.Office.Interop.Word usenet DOTNET 0 05-26-2006 10:11 AM


All times are GMT -5. The time now is 01:09 AM.

Managed by Infnx Pvt Ltd.