I go away for five minutes and all hell breaks loose
The correct code for this option is
Sub AutoOpen()
ActiveWindow.Caption = ActiveDocument.FullName
With ActiveWindow.View
.Type = wdPrintView
.Zoom.PageFit = wdPageFitBestFit
End With
End Sub
The caption line is optional.
--
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
Opinicus wrote:
"Stefan Blom" wrote in message
...
To set the zoom to "Page width", use:
ActiveWindow.View.Zoom.PageFit = wdPageFitBestFit
Stefan, I can't get it to work:
quote
Sub AutoOpen()
ActiveWindow.Caption = ActiveDocument.FullName
With ActiveWindow.View
.Type = wdPrintView
ActiveWindow.View.Zoom.PageFit = wdPageFitBestFit
End With
End Sub
/quote
If open a file that somebody saved with a "100%" zoom
percentage, it still opens with that percentage even with
the macro above.
What I'm trying to accomplish is this: no matter what type
or size view a document may have been closed with, when I
open it, it will be in "print view" and "page width". Is
that possible?