VBA/Excel/Access/Word/Word/Document View

Материал из VB Эксперт
Перейти к: навигация, поиск

changes the view for Sample.doc to Print Layout view

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdPrintView

End Sub

</source>
   
  


Change the document view to normal view

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdNormalView

End Sub

</source>
   
  


Change the document view to print view

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdOutlineView

End Sub

</source>
   
  


change the document view to reading view

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdReadingView

End Sub

</source>
   
  


Change the document view to wdMasterView

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdMasterView

End Sub

</source>
   
  


change the document view to wdWebView

   <source lang="vb">

Sub view()

   Documents("Sample.doc").Windows(1).View.Type = wdPrintView

End Sub

</source>
   
  


Zooming the View to Display Multiple Pages

   <source lang="vb">

Sub zoom()

   With Documents("Sample.doc").Windows(1).View
       .Type = wdPrintView
       With .Zoom
           .PageColumns = 3
           .PageRows = 2
       End With
   End With

End Sub

</source>