🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.office.developer.automation
Article #7

Re: Changing ActivePresentation

#7
From: Steve Rindsberg
Date: Tue, 01 Mar 2005 16:20
54 lines
2801 bytes
In article <1109661686.51153@news.liwest.at>, Roland Leisch wrote:
> > Unless other code forces it, there doesn't have to be at least one 
> > presentation.  Might that be the problem?
> 
> Hello!
> 
> Thanks for yyour answer but Im sorry I didnt understand it. 

Hi Roland, 

No worries.  I'm probably misunderstanding your question too. ;-)
But I was responding to this:

=========
Source:
((_PresentationImpl) presentations.item(new 
Variant(1))).getWindows().item(new Int(1)).activate();

I thought that this piece of code should work alsways since there has 
always to be a least one presentation and one window but there is an 
exception thrown in getWindows since count is zero?!?
============

I'm probably mistaken, but it looks like you're referencing 

Presentions.Item(some_number)

But if there are no presentations open, there can be no 
Presentations.Item(anything)




My Problem 
> is that if I start 2 instances of my application (each one contains an 
> ole container with and powerpoint presentation) only the last started 
> instance reacts to any commands. So I want to activate the first 
> instance to be able to exectue methods on this one.
> 
> So I wrote a method which identifies the right instance (ole container 
> with presentation) and now I have to activate this one. But that doesnt 
> work since Windows-Count is zero and I cant execute activate method!
> 
> Thanks in advance!
>




--
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Technical Details
Message-ID: <VA.000012d4.26bbf1a0@localhost.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!newshub.sdsu.edu!cyclone.bc.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
References: <1109601286.547140@news.liwest.at> <VA.000012c9.224fc27a@localhost.com> <1109661686.51153@news.liwest.at>

Show Full Headers
Complete Article Headers
X-Google-Thread: fd4fc,e54bbe412343dd08
X-Google-Thread: f962e,e54bbe412343dd08
X-Google-Thread: fe15c,e54bbe412343dd08
X-Google-Thread: fd196,e54bbe412343dd08
X-Google-Attributes: gidfd4fc,gidf962e,gidfe15c,gidfd196,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 01 Mar 2005 11:20:02 EST
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va
Organization: PowerPoint MVP
Message-ID: <VA.000012d4.26bbf1a0@localhost.com>
Subject: Re: Changing ActivePresentation
From: Steve Rindsberg <abuse@localhost.com>
Reply-To: abuse@localhost.com
References: <1109601286.547140@news.liwest.at> <VA.000012c9.224fc27a@localhost.com> <1109661686.51153@news.liwest.at>
Newsgroups: microsoft.public.office.developer.automation,microsoft.public.vb.ole.automation,microsoft.public.win32.programmer.ole,borland.public.delphi.oleautomation
NNTP-Posting-Host: nr30-69-61-180-104.fuse.net 69.61.180.104
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!newshub.sdsu.edu!cyclone.bc.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
Lines: 1