Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to run Powerpoint slideshow inside a dialog

28 views
Skip to first unread message

Roland

unread,
Apr 6, 2007, 7:32:47 AM4/6/07
to microsoft.public.office.developer.automation
Hi All,
I am trying to display powerpoint slides in a dialog create by my
application.


if(m_pptapp.m_lpDispatch == NULL)
{
if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
{
AfxMessageBox("Could not create Powerpoint object.");
return;
}
}

m_pptapp.SetVisible((long)1);


Presentations presentations;
SlideShowSettings slideshow;

presentations = m_pptapp.GetPresentations();
m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
(long)-1,(long)1 );

slideshow = m_pptpresentation.GetSlideShowSettings();
slideshow.SetShowType(1);
slideshow.Run();


but it is not helpful for me

Could some flash some light on how to show powerpoint slides inside
dialog, Dialog should act as a container for powerpoint slides.

Thanks,
Ajay

AliR (VC++ MVP)

unread,
Apr 6, 2007, 11:50:58 AM4/6/07
to
This might be a good start

http://support.microsoft.com/kb/q180616/
http://support.microsoft.com/kb/237554


AliR.

"Roland" <ajay.s...@gmail.com> wrote in message
news:1175859167.5...@w1g2000hsg.googlegroups.com...

Roland

unread,
Apr 9, 2007, 12:29:18 AM4/9/07
to
Ali,
I want to run the presenation or attach the window of presentation to
the dialog or some window create by my application. I don't want to
just "Run" the presentation.

-Ajay

On Apr 6, 8:50 pm, "AliR \(VC++ MVP\)" <A...@online.nospam> wrote:
> This might be a good start
>
> http://support.microsoft.com/kb/q180616/http://support.microsoft.com/kb/237554
>
> AliR.
>

> "Roland" <ajay.sonaw...@gmail.com> wrote in message


>
> news:1175859167.5...@w1g2000hsg.googlegroups.com...
>
>
>
> > Hi All,
> > I am trying to display powerpoint slides in a dialog create by my
> > application.
>
> > if(m_pptapp.m_lpDispatch == NULL)
> > {
> > if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
> > {
> > AfxMessageBox("Could not create Powerpoint object.");
> > return;
> > }
> > }
>
> > m_pptapp.SetVisible((long)1);
>
> > Presentations presentations;
> > SlideShowSettings slideshow;
>
> > presentations = m_pptapp.GetPresentations();
> > m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
> > (long)-1,(long)1 );
>
> > slideshow = m_pptpresentation.GetSlideShowSettings();
> > slideshow.SetShowType(1);
> > slideshow.Run();
>
> > but it is not helpful for me
>
> > Could some flash some light on how to show powerpoint slides inside
> > dialog, Dialog should act as a container for powerpoint slides.
>
> > Thanks,

> >Ajay- Hide quoted text -
>
> - Show quoted text -


AliR (VC++ MVP)

unread,
Apr 9, 2007, 10:26:07 AM4/9/07
to
If you wanted to just "Run" it, then I would have told you to use
ShellExecute.

The articles that I pointed you to tells you how to embed the presentation
into your window using Automation. That means that it shows up in your
application.

what do YOU mean by attach?
AliR.

"Roland" <ajay.s...@gmail.com> wrote in message

news:1176092958.6...@y66g2000hsf.googlegroups.com...

Ajay Kalra

unread,
Apr 9, 2007, 10:57:39 AM4/9/07
to
On Apr 9, 12:29 am, "Roland" <ajay.sonaw...@gmail.com> wrote:
> Ali,
> I want to run the presenation or attach the window of presentation to
> the dialog or some window create by my application. I don't want to
> just "Run" the presentation.
>


You will need to use Automation and use PP's object model to do this.
All this involves using COM on your side(client). Its relatively
simple to do this in .Net as you avoid COM altogether.

---
Ajay

Roland

unread,
Apr 10, 2007, 6:39:28 AM4/10/07
to
I know, but I want to follow this one
http://skp.mvps.org/vb/pptvbwnd.htm
where slideshow window is inside a frame control.
Can I do somewhat like this ?

Thanks,
Ajay

Ajay Kalra

unread,
Apr 10, 2007, 9:15:04 AM4/10/07
to
On Apr 10, 6:39 am, "Roland" <ajay.sonaw...@gmail.com> wrote:
> I know, but I want to follow this onehttp://skp.mvps.org/vb/pptvbwnd.htm

> where slideshow window is inside a frame control.
> Can I do somewhat like this ?
>

Yes, you should be able to do this as well. Sample is using the PP's
object model and you can do the same in MF/C++. As I had mentioned
earlier, its much easier to do this in VB or .Net.

---
Ajay

0 new messages