Article View: microsoft.public.office.developer.automation
Article #4Changing ActivePresentation
From: Roland Leisch
Date: Mon, 28 Feb 2005 15:21
Date: Mon, 28 Feb 2005 15:21
30 lines
2494 bytes
2494 bytes
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?!?
Technical Details
Message-ID:
<1109601286.547140@news.liwest.at>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.inode.at!newsfeeder1.noc.eunet-ag.at!news.eunet.at!paperboy.Austria.EU.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fd4fc,e54bbe412343dd08,start X-Google-Thread: f962e,e54bbe412343dd08,start X-Google-Thread: fe15c,e54bbe412343dd08,start X-Google-Thread: fd196,e54bbe412343dd08,start X-Google-Attributes: gidfd4fc,gidf962e,gidfe15c,gidfd196,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.inode.at!newsfeeder1.noc.eunet-ag.at!news.eunet.at!paperboy.Austria.EU.net!not-for-mail From: Roland Leisch <leisch@24speed.at> Newsgroups: microsoft.public.office.developer.automation,microsoft.public.vb.ole.automation,microsoft.public.win32.programmer.ole,borland.public.delphi.oleautomation Subject: Changing ActivePresentation Date: Mon, 28 Feb 2005 16:21:26 +0100 Organization: LiWest AG Lines: 30 Message-ID: <1109601286.547140@news.liwest.at> NNTP-Posting-Host: lilznntp.liwest.at Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: paperboy.Austria.EU.net 1109604086 4905 212.33.32.148 (28 Feb 2005 15:21:26 GMT) X-Complaints-To: abuse@EUnet-AG.at NNTP-Posting-Date: Mon, 28 Feb 2005 15:21:26 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.7.1 X-Accept-Language: en-us, en Cache-Post-Path: news.liwest.at!unknown@cm192-173.liwest.at X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/)