Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate page width

Status
Not open for further replies.

offthewall

Programmer
Joined
Mar 6, 2002
Messages
3
Location
US
Wondering why this generates an error (Word 97, as a new file from a template):

ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit

error:
Run-time error '91'
Object variable or With Block variable not set

It doesn't generate the error if I just click on it, however (as opposed to FILE, New)...

I got around it by using sendkeys, but then I have to clean out the typeahead buffer.....

any ideas what I'm missing?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top