Consulting

Results 1 to 3 of 3

Thread: New Slide event fires on using Export method

  1. #1

    New Slide event fires on using Export method

    Hi


    I have PPT Add-In code that hasn't changed in years that is suddenly failing. I believe it is the latest version of 365 that is doing it (or at least the version I get for my Business 365 subscription).


    The code that fails is a PPT Event (handled using the normal class based method) ...


    Private Sub appPowerPoint_PresentationNewSlide(ByVal sld As Slide)
        Dim cSystem As clsSystem
        Set cSystem = New clsSystem
        cSystem.cTOC.CheckForTOCSourceStatus sld
        cSystem.cTOC.RenumberAllNumberedItems
        Set cSystem = Nothing
    End Sub

    This is the error that appears ...


    "Run-time error '-2147188720 (80048010)'
    Slide (unknown member): Object does not exist


    If I catch the error and interrogate things via the Immediate Window, I find that the variable "sld" is not a slide object (whatever property I ask for gives "Object does not exist"). It also won't respond True to "is Nothing".


    The code being called that triggers the even is this ...


          
    sldDeck.Export sImage, "JPG", lWidth, lHeight

    sldDeck is a PowerPoint Slide object in the active presentation.


    I can't imagine why exporting a slide as an image would trigger a New Slide event?


    I can just use an On Error Resume Next and On Error Goto 0 around my 2 calls but I'd rather understand what is going on!


    I have checked that the New Slide event still fires correctly later in the process (when it actually should) and in those cases the sld object is fine.


    My PC (doesn't have the issue as yet tho has an update waiting to install) is this version of PPT ...


    Version 2101 (Build 13628.20448 Click-to-Run)


    My Laptop (which does fail) has this one ...


    Version 2108 (Build 14326.20404 Click-to-Run)


    Has anyone else seen this type of thing?


    Thanks


    Simon

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,015
    Location
    No idea why but I can confirme the event is triggered here too. I have 365 version 2109
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Thanks John. Good to know not just me!

    I have gone for an On Error "ignore" for now as can't think of what else to do.

    Simon

Tags for this Thread

Posting Permissions

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