Getting PowerPoint 2003 hWnd in VB

S

Stumpiana

When I automate a PowerPoint application, for Office 2000 I do the following
to get a handle to the PowerPoint window:

strCaption = mobjPptApp.Caption & " - [" & mobjPptApp.Windows(1).Caption &
"]"
mHwnd = FindWindow("PP9FrameClass", strCaption)

This does not work for Office 2003. What would be the procedure for
PowerPoint in Office 2003 and also Office XP?

Thank you,
Stumpiana2
 
S

Stumpiana

Thank you so much!


Steve Rindsberg said:
Stumpiana said:
When I automate a PowerPoint application, for Office 2000 I do the following
to get a handle to the PowerPoint window:

strCaption = mobjPptApp.Caption & " - [" & mobjPptApp.Windows(1).Caption &
"]"
mHwnd = FindWindow("PP9FrameClass", strCaption)

This does not work for Office 2003. What would be the procedure for
PowerPoint in Office 2003 and also Office XP?

PowerPoint XP/2002 = Version 10 so PP10FrameClass
PowerPoint 2003 = Version 11 so PP11FrameClass
PowerPoint97 = Version 8 so PP97FrameClass Huh? Yeah.



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top