T
Tony Logan
I can't figure out why I'm getting an error when I try to access the Zoom
property.
When I debug, there's no error, but when I run the code, the line
".ActiveWindow.View.Zoom = 100" produces the following error:
Run-time error
View (unknown member): Failed
I checked to make sure the file isn't read only. I'm running PowerPoint
2003, Windows XP with SP 2.
Here' s the code:
Sub test()
Dim ppt As PowerPoint.Application
Set ppt = New PowerPoint.Application
With ppt
.Presentations.Open ("C:\test.ppt")
If .ActiveWindow.ViewType <> ppViewNormal Then
.ActiveWindow.ViewType = ppViewNormal
End If
.ActiveWindow.View.Zoom = 100 ' error produced here
End With
End Sub
property.
When I debug, there's no error, but when I run the code, the line
".ActiveWindow.View.Zoom = 100" produces the following error:
Run-time error
View (unknown member): Failed
I checked to make sure the file isn't read only. I'm running PowerPoint
2003, Windows XP with SP 2.
Here' s the code:
Sub test()
Dim ppt As PowerPoint.Application
Set ppt = New PowerPoint.Application
With ppt
.Presentations.Open ("C:\test.ppt")
If .ActiveWindow.ViewType <> ppViewNormal Then
.ActiveWindow.ViewType = ppViewNormal
End If
.ActiveWindow.View.Zoom = 100 ' error produced here
End With
End Sub