Powerpoint Viewer object model giving problems

M

Manoj Pandole

Hi,

I am working on a scenario where an application starts
Powerpoint Viewer 97(this is a MFC application), and
there's another application( a VB6 one) which should be
able to get a reference to SlideShowView started by MFC
application.Although i am able to get a reference to
Powerpoint viewer from VB6 application for which i use
this code,

Dim objPPTVwr As PowerPointViewer.Application

Set objPPTVwr = GetObject(, "PowerPointViewer.Application")

These statements let me get a reference to already running
Powerpoint viewer, but when i use the statements below to
get a reference to SlideShowView like this,

Dim objPPTSlideShowView As PowerPointViewer.SlideShowView

Set objPPTSlideShowView = GetObject_
("", "PowerPointViewer.SlideShowView")

I get an error

"ActiveX component can't create object"


Can somebody please tell me how i can get a reference to
SlideShowView object of a powerpoint viewer started by
another application?

I have gone through microsoft's KB articles but they don't
provide much help on this. Please help me out.

Regards,
Manoj Pandole
 
S

Shyam Pillai

Manoj,
I haven't looked at the object model of the viewer but once you have the
reference of the application can't you just access it as follows:
objPPTVwr.SlideShowView.<property/method> ?
 
G

Guest

Hi Shyam,

The powerpoint viewer object model doesn't provide it us
with this privilege of accessing SlideShowView like that.
Instead it returns a SlideShowView object if we do
something like this,

Dim objPPTVwr as PowerPointViewer.Application

Set objPPTVwr=CreateObject("PowerPointViewer.Application")

Dim objSlideShowView as PowerPointViewer.SlideShowView

Set objSlideShowView=objPPTVwr.NewShow_
(filename,SlideShowManualOrUsingTimings,KioskModeOrNot)

So you see, we can get a SlideShowView of a show started
by my application, but here's my problem, how i get
SlideShowView of a show started by another application
using PowerPointViewer object model. I have tried
something like this, and have failed to get SlideShowView

Dim objPPTVwr As PowerPointViewer.Application

Set objPPTVwr = GetObject(, "PowerPointViewer.Application")

Dim objPPTSlideShowView As PowerPointViewer.SlideShowView

Set objPPTSlideShowView = GetObject_
("", "PowerPointViewer.SlideShowView")

Although i got reference to powerpoint viewer
(ppview32.exe) started by another application(not my
application), i couldn't get a reference to SlideShowView
of using the above statements.

Please help on that.

Regards,
Manoj Pandole
 
S

Shyam Pillai

Ok, I downloaded the viewer and tried to see if it can be done.
Unfortunately, I couldn't arrive at a solution for your requirement and I
don't think it can be done because of the object model limitations.
 
J

John Langhans [MSFT]

[CRITICAL UPDATE - If you are using Office 2003, you should install this
update as soon as possible. From PowerPoint, choose "Help -> Check for
Updates".]

Hello,

As you can see, PowerPoint Viewer 97 has a very limited object model (and
PowerPoint Viewer 2003 does not expose ANY objects for purposes of
automation).

If it is important to you (or anyone else reading this message) suggestions
about the object mode for the PowerPoint Viewer (what specifically should
it expose? how would you use these objects? What solutions would they
enable?), don't forget to send your feedback to Microsoft at:

http://register.microsoft.com/mswish/suggestion.asp

As with all product suggestions, it's important that you not just state
your wish but also WHY it is important to you that your product suggestion
be implemented by Microsoft. Microsoft receives thousands of product
suggestions every day and we read each one but, in any given product
development cycle, there are only sufficient resources to address the ones
that are most important to our customers so take the extra time to state
your case as clearly and completely as possible.

IMPORTANT: Each submission should be a single suggestion (not a list of
suggestions).

John Langhans
Microsoft Corporation
Supportability Program Manager
Microsoft Office PowerPoint for Windows
Microsoft Office Picture Manager for Windows

For FAQ's, highlights and top issues, visit the Microsoft PowerPoint
support center at: http://support.microsoft.com/default.aspx?pr=ppt
Search the Microsoft Knowledge Base at:
http://support.microsoft.com/default.aspx?pr=kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top