powerpoint >> VBA to activate a specific presentation

by QmFyYiBSZWluaGFyZHQ » Wed, 03 Dec 2008 03:06:16 GMT

I have the following snippet of code and want to activate myPres

For Each myPres In PPTApp.Presentations
Debug.Print myPres.Name
If myPres.Name = myPPT.Name Then
myPres.Activate 'This doesn't work. What do I need to do
Exit For
End If
Next myPres

Thanks,
Barb Reinhardt


powerpoint >> VBA to activate a specific presentation

by Shyam Pillai » Wed, 03 Dec 2008 03:34:53 GMT


Change myPres.Activate to myPres.Windows(1).Activate

Regards,
Shyam Pillai

Animation Carbon: http://www.animationcarbon.com

Similar Threads

1. VBA - Activate a PowerPoint presentation in a specific Excel windo

I am trying to solve a problem where a presentation object is embedded in a 
second window within Excel. When I double-click on the object in the second 
window, it is activated in the second window. Note that the slide show is set 
up to run in a window. 

When I attempt to automate via Object.Activate or OLEFormat.Verb, the slide 
show always jumps to the first window regardless of the fact that the second 
window is the active window. 

I am currently using the 2002 version of Office. It would be nice to get it 
to work witnin VBA, but no luck so far. 

2. Activating the right presentation in VBA

3. Activate Excel after opening PowerPoint from VBA Excel

I am creating a tool in Excel to copy data/graph from 
Excel to PowerPoint.


Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation

Set PPApp = CreateObject("PowerPoint.Application")
PPApp.Visible = True
Set PPPres = PPApp.Presentations.Open(ppt_file)
....


At the end of the code, I put:

ThisWorkbook.Activate
Msgbox("You have finished running the tool")

But it seems the screen still focuses in PowerPoint, so I 
have to manually switch to Excel to see the msgbox. How do 
I change the screen to the Excel file instead? Or, is it 
possible to create the msgbox in PowerPoint instead?

Also, I put Application.ScreenUpdating = False in my code, 
but it seems it onlhy works for Excel?  


Thanks for the help
   


4. VBA: Capture/catch keyboard events to activate macro

5. Activating animation using VBA

I am trying to apply animation to a slide or to turn off animation on a slide 
using VBA or to determine animation status of specific slide but am stuck.  
Any ideas on how to achieve this?

6. Reliably activate PowerPoint, do something, Activate Excel - Excel

7. I activated powerpoint, want to activate word intrial version

-- 
Jan M. Tyler

8. PP 2000 - remove specific objects from specific slides - slide master