Question ActivePresentation object equivalent?

the_cat

New member
Joined
Nov 11, 2011
Messages
1
Programming Experience
3-5
Hi,

I made a macro for MS Powerpoint 2010 in its own VB6 environment, then I downloaded VS 2010 Ultimate with a view to turning it into a proper "Add-In" that I can deploy to other machines. The macro works perfectly in MS Powerpoint 2010.

The problem is that VS 2010 seems to not support older VB6 objects. Here is a snippet of code that I am stuck on:

slideToApply = Int(InputBox("Enter slide number to process"))
'Grab focus on the relevant slide
currentSlide = ActivePresentation.Slides(slideToApply)
currentSlide.Select()

The compiler tells me that "ActivePresentation is not declared. It may be inaccessible due to its protection level".

So, my question is how do I select a slide by the slide number in the "active presentation" in VB 2010?

I can't work it out via Google search, so I ask here.

Many thanks in advance,
Dave
 
Back
Top