PC Review


Reply
Thread Tools Rate Thread

change active window

 
 
theintern
Guest
Posts: n/a
 
      4th Sep 2008
I have some vba that runs some queries in access, opens up microsoft project,
does some stuff in project, and then opens up Powerpoint and does some stuff
there too. this is all possible because i've included the references, so i
can build this into just one module. the problem however is that my PP code
using the ActiveWindow.Presentation.Slides(1) command and at that time PP
isn't the active window. How do i specifically set the active window to be
PowerPoint?

thanks
Scott
 
Reply With Quote
 
 
 
 
Graham Mandeno
Guest
Posts: n/a
 
      4th Sep 2008
Hi Scott

You'd be better off asking this in a PowerPoint newsgroup.

I'm not familiar with the PPT object model, but if it's anything like Excel
the Application object will have an ActivePresentation property which
returns a reference to a Presentation object. I would advise you to use
PptApp.ActivePresentation.

Even better, you have presumably, earlier in you code, either opened an
existing presentation or created a new one. You should retain the object
reference returned by that operation:

Dim MyPres as PowerPoint.Presentation
Set MyPres = PptApp.Presentations.Add( ... )
or
Set MyPres = PptApp.Presentations.Open( ... )

Then...
MyPres.Slides(1)...

--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

"theintern" <(E-Mail Removed)> wrote in message
news:4E986688-6E43-46B9-B366-(E-Mail Removed)...
>I have some vba that runs some queries in access, opens up microsoft
>project,
> does some stuff in project, and then opens up Powerpoint and does some
> stuff
> there too. this is all possible because i've included the references, so
> i
> can build this into just one module. the problem however is that my PP
> code
> using the ActiveWindow.Presentation.Slides(1) command and at that time PP
> isn't the active window. How do i specifically set the active window to
> be
> PowerPoint?
>
> thanks
> Scott



 
Reply With Quote
 
theintern
Guest
Posts: n/a
 
      4th Sep 2008
Thanks graham. Unfortunately, neither of these are working. it's all very
strange. i'll post in a PowerPoint forum and see what i can get.

Thanks
Scott

"Graham Mandeno" wrote:

> Hi Scott
>
> You'd be better off asking this in a PowerPoint newsgroup.
>
> I'm not familiar with the PPT object model, but if it's anything like Excel
> the Application object will have an ActivePresentation property which
> returns a reference to a Presentation object. I would advise you to use
> PptApp.ActivePresentation.
>
> Even better, you have presumably, earlier in you code, either opened an
> existing presentation or created a new one. You should retain the object
> reference returned by that operation:
>
> Dim MyPres as PowerPoint.Presentation
> Set MyPres = PptApp.Presentations.Add( ... )
> or
> Set MyPres = PptApp.Presentations.Open( ... )
>
> Then...
> MyPres.Slides(1)...
>
> --
> Good Luck :-)
>
> Graham Mandeno [Access MVP]
> Auckland, New Zealand
>
> "theintern" <(E-Mail Removed)> wrote in message
> news:4E986688-6E43-46B9-B366-(E-Mail Removed)...
> >I have some vba that runs some queries in access, opens up microsoft
> >project,
> > does some stuff in project, and then opens up Powerpoint and does some
> > stuff
> > there too. this is all possible because i've included the references, so
> > i
> > can build this into just one module. the problem however is that my PP
> > code
> > using the ActiveWindow.Presentation.Slides(1) command and at that time PP
> > isn't the active window. How do i specifically set the active window to
> > be
> > PowerPoint?
> >
> > thanks
> > Scott

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change active window theintern Microsoft Powerpoint 5 8th Sep 2008 02:40 PM
Change 'Active' Window? =?Utf-8?B?Z2FyeWg=?= Microsoft Access Form Coding 0 30th Oct 2007 01:16 PM
active window does not automatically change =?Utf-8?B?aGVhdGhlcnQ4Nw==?= Windows XP Internet Explorer 0 22nd Dec 2006 01:56 PM
active window focus change TomG Windows XP Basics 1 2nd Jun 2004 04:56 PM
Automatic change of active window =?Utf-8?B?SmFnb2Rh?= Windows XP Help 1 21st Jan 2004 04:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:05 AM.