当Word 2010启动时,我会自动执行VBA代码
ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
以使文档适合页面。
非常感谢您的提示
您可以将命令放在 AutoExec 宏中。
Sub AutoExec()
ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
End Sub
您可以将如下所示的宏添加到全局模板(例如 Normal.dotm)的"ThisDocument"代码模块中:
Private Sub Document_Open()
With ActiveWindow
'Reduce flickering while changing settings
.Visible = False
'Switch to a single view pane
.View.SplitSpecial = wdPaneNone
.View.Type = wdPrintView
.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
'Restore the window now that we're finished
.Visible = True
End With
End Sub