RE: COMException while formatting PowerPoint shapes
- From: v-phuang@xxxxxxxxxxxxxxxxxxxx ("Peter Huang" [MSFT])
- Date: Sat, 17 Dec 2005 08:13:28 GMT
Hi Mike,
Based on my test, it seems that the VBA code did not run well at my side.
So far we summarized your scenario as below.
In your PPT there is a Table which is a Shape.
Use the code below, we first run Test Macro to get the Shape r eference and
run Test2 to use the Reference. That works at my side.
Dim o As Shape
Sub Test()
'Set o = Application.ActivePresentation.Slides(1).Shapes
Set o = ActiveWindow.Selection.ShapeRange(1)
MsgBox o.Name
End Sub
Sub Test2()
MsgBox o.Name
End Sub
Also as I mentioned before, you may try to use the
ActiveWindow.Selection.ShapeRange(1) to reference to the shape again but
not use the reference.
Even use the Application.ActivePresentation.Slides(1).Shapes collection to
see if that shape existed in the collection when the second reference
attempt.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- RE: COMException while formatting PowerPoint shapes
- From: "Peter Huang" [MSFT]
- RE: COMException while formatting PowerPoint shapes
- From: Mike Clayton
- RE: COMException while formatting PowerPoint shapes
- From: "Peter Huang" [MSFT]
- RE: COMException while formatting PowerPoint shapes
- Prev by Date: RE: DocumentAfterClose event?
- Next by Date: RE: DocumentAfterClose event?
- Previous by thread: RE: COMException while formatting PowerPoint shapes
- Next by thread: RE: COMException while formatting PowerPoint shapes
- Index(es):
Relevant Pages
|