Shyam Pillai's ScreenUpdating with Office 2016
Shyam Pillai has a nice piece of PP code to turn off screen updating:
http://skp.mvps.org/ppt00033.htm
Does anyone know the Office 2016 (16.0) class name? I guessed at some but I guess I'm not a good guesser.
I do get a hwnd, but it fails on LockWindowUpdate
Code:
Get handle to the main application window using ClassName
Select Case VersionNo
Case "8" ' For PPT97:
hwnd = FindWindow("PP97FrameClass", 0&)
Case "9" ' For PPT2K:
hwnd = FindWindow("PP9FrameClass", 0&)
Case "10" ' For XP:
hwnd = FindWindow("PP10FrameClass", 0&)
Case "11" ' For 2003:
hwnd = FindWindow("PP11FrameClass", 0&)
Case "12" ' For 2007:
hwnd = FindWindow("PP12FrameClass", 0&)
Case "14" ' For 2010:
hwnd = FindWindow("PPTFrameClass", 0&)
Case "15" ' For 2013:
hwnd = FindWindow("PPTFrameClass", 0&)
Case "16" ' For 2016: -------------------------------------------------------------------- my guess
hwnd = FindWindow("PPTFrameClass", 0&)
Case Else
Err.Raise Number:=vbObjectError + ERR_VERSION_NOT_SUPPORTED, _
Description:="Newer version."
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
If LockWindowUpdate(hwnd) = 0 Then
Err.Raise Number:=vbObjectError + ERR_WINDOW_LOCK_FAIL, _
Description:="Unable to set a PowerPoint window lock"
Exit Property
End If
Please send me the Full Code
Quote:
Originally Posted by
Paul_Hossler
I figured it out
I had my Booleans reversed in the calling module
Shyam Pillai's code works fine
Hi Paul,
I am struggling to LockWindowUpdate for PowerPoint 2016.
Could you please send me the changes in code you have done to execute for yourself.
What is the classname instead of "PPTFrameClass"?