Hi,
We have a Visual Basic application that uses OLE automation to control PowerPoint (loop through slides, extract information, etc). For some reason, the looping through the slides portion of the code is throwing an error (but only on my computer -- other peoples computers don't seem to be having this issue).
The code in question is the following (code has been shortened for conciseness):
MsgBox ppt.ActivePresentation.Slides.count
Dim oSl As Object
For Each oSl In ppt.ActivePresentation.Slides
Next
The statement that has the Message Box works fine, and gives the correct number of slides of the presentation that was opened.
The "For Each" line throws an error which is:
"Property let procedure not defined and property get procedure did not return an object".
-- The weirdest part of this is that it seems to work fine on other peoples computers, but something is causing an issue on mine (though it used to work in the past). I haven't worked on this application in quite a while, so I can't determine what has been recently changed on this computer.
-- Does anyone have any thoughts or suggestions on how to determine the underlying issue with this?
Thanks for any thoughts.
We have a Visual Basic application that uses OLE automation to control PowerPoint (loop through slides, extract information, etc). For some reason, the looping through the slides portion of the code is throwing an error (but only on my computer -- other peoples computers don't seem to be having this issue).
The code in question is the following (code has been shortened for conciseness):
MsgBox ppt.ActivePresentation.Slides.count
Dim oSl As Object
For Each oSl In ppt.ActivePresentation.Slides
Next
The statement that has the Message Box works fine, and gives the correct number of slides of the presentation that was opened.
The "For Each" line throws an error which is:
"Property let procedure not defined and property get procedure did not return an object".
-- The weirdest part of this is that it seems to work fine on other peoples computers, but something is causing an issue on mine (though it used to work in the past). I haven't worked on this application in quite a while, so I can't determine what has been recently changed on this computer.
-- Does anyone have any thoughts or suggestions on how to determine the underlying issue with this?
Thanks for any thoughts.