tbaker818
08-28-2015, 02:49 PM
Whenever possible, I'd like to define object variables as their specific type and not have to resort to the generic Object. Since I'm new to the PowerPoint object model, it really slows me down when I can't use the Intellisense. I haven't found a way to definitively determine an object's type, either through the documentation, or when I'm backing into the variable via the Selection property:
Dim shShape as Shape
Set pptScaleBreakPres = appPPT.Presentations.Open("C:\Users\516785\Documents\Missed Milestones Visual\Scale Break Graphic.pptx")
Set shShape = appPPT.ActiveWindow.Selection
Using the above code, if I create a Watch on shShape, it will often say the Type is "Object/Shape" and yet, if I try to define it as a Shape, I'll get a Type Mismatch.
Dim shShape as Shape
Set pptScaleBreakPres = appPPT.Presentations.Open("C:\Users\516785\Documents\Missed Milestones Visual\Scale Break Graphic.pptx")
Set shShape = appPPT.ActiveWindow.Selection
Using the above code, if I create a Watch on shShape, it will often say the Type is "Object/Shape" and yet, if I try to define it as a Shape, I'll get a Type Mismatch.