Article View: microsoft.public.office.developer.automation
Article #5Re: Changing ActivePresentation
From: Steve Rindsberg
Date: Mon, 28 Feb 2005 19:43
Date: Mon, 28 Feb 2005 19:43
37 lines
2537 bytes
2537 bytes
In article <1109601286.547140@news.liwest.at>, Roland Leisch wrote: > Hello! > > I have a very strange problem: > > I try to change the active window (so change are applied to the right > window if several windows are open) and therefore I wrote a method which > searches for a special custom property and if it finds the needed one > this presentation is activated (at last it should be!). The problem now > is, that I cannont activate the presentations since Windows - Count is 0 > and I get an exception. > > Can anybody give me a hint where the problem could be? My main problem > is that I cant understand, why Windows collection can be 0 (I thought > that at least one window has to be opened)? > > Im using a Java-COM bridge to integrate Powerpoint in an ole container > within my Java application. > > Thanks in advance! > > 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?!? Unless other code forces it, there doesn't have to be at least one presentation. Might that be the problem? -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================
Technical Details
Message-ID:
<VA.000012c9.224fc27a@localhost.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gblReferences:
<1109601286.547140@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: Mon, 28 Feb 2005 14:43:23 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.000012c9.224fc27a@localhost.com> Subject: Re: Changing ActivePresentation From: Steve Rindsberg <abuse@localhost.com> Reply-To: abuse@localhost.com References: <1109601286.547140@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!news3.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl Lines: 1