Consulting

Results 1 to 5 of 5

Thread: Solved: PP2010 ScreenUpdating = False

  1. #1
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location

    Solved: PP2010 ScreenUpdating = False

    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


    [VBA]
    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
    [/VBA]

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

    Any ideas?

    Paul

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    Shyam came through

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

    Paul

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    He's a genius! (And as real nice guy too)
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Newbie
    Joined
    Aug 2013
    Posts
    1
    Location
    Hi,

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

    Esben

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •