VBA error when accessing Zoom property

G

Guest

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
 
G

Guest

Hi, John. If I'd done just one more test...

Apparently there IS something special about my test file, as I just tried it
with about a dozen other files and I got no errors. I'll go back to my
original test file and see if I can figure out what was different about that
one.

Thanks for the response.
 
S

Shyam Pillai

Hi Tony,
It's possible that the thumbnail pane is active in the presentation
which gives the following error. Activate the slide pane in the normal
view before initiating the command.

Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top