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