PDA

View Full Version : Solved: PP2010 ScreenUpdating = False



Paul_Hossler
08-18-2010, 08:24 PM
Using Shyam Pillai's VBA to turn off screen updating in 2007

http://skp.mvps.org/ppt00033.htm

Doesn't work as-is in 2010. I took a shot at what seemed a reasonable guess, but guess I wan't close



VersionNo = Left(Application.Version, InStr(1, Application.Version, ".") - 1)

' Get handle to the main application window using ClassName
Select Case VersionNo

' .........
Case "12" ' For 2007:
hwnd = FindWindow("PP12FrameClass", 0&)

Case "14" ' For 2010:------ This does NOT work. My guess :-(
hwnd = FindWindow("PP14FrameClass", 0&)


Case Else
Err.Raise Number:=vbObjectError + ERR_VERSION_NOT_SUPPORTED, _
Description:="Supported for some PowerPoint versions only."
Exit Property
End Select

If hwnd = 0 Then
Err.Raise Number:=vbObjectError + ERR_NO_WINDOW_HANDLE, _
Description:="Unable to get the PowerPoint Window handle"
Exit Property
End If


It appears that I need the FrameClass of PP2010, even Google didn'thelp

Any ideas?

Paul

John Wilson
08-19-2010, 04:03 AM
Hi Paul,
Don't have time to work on this just now but my guess is it may be the API declarations. (Definitely is if you have 64bit office as they must be declared as ptrsafe)

Google for ptrsafe API

Paul_Hossler
08-19-2010, 06:56 PM
Shyam came through :clap:


'For 2010 you need to add this:
Case "14" ' For 2010:
hwnd = FindWindow("PPTFrameClass", 0&)


Paul

John Wilson
08-21-2010, 05:59 AM
He's a genius! (And as real nice guy too)

esbenth
08-05-2013, 06:46 AM
Hi,

Does anyone know how to make Shyam's solution work with Powerpoint 2013?

Esben