Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

View Zoom Two Pages macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kamran - 24 Jul 2007 16:08 GMT
Hello,
I'm trying to make a macro that gives me a shortcut to View Zoom Two Pages.  
I used the macro recorder to get the last part of the code, but I need it to
give me the two-page view in Print Layout from whatever other mode it's in
when I select it.  Thanks for any help.
Kamran.

=======

   If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
       ActiveWindow.ActivePane.View.Type = wdPrintView
   End If
   With ActiveWindow.ActivePane.View.Zoom
       .PageColumns = 2
       .PageRows = 1
   End With
   End Sub
Helmut Weber - 24 Jul 2007 18:42 GMT
Hi Kamran,

I don't know whether the following covers all possible situations.
But it may be a start:

Sub MyTest()
  CommandBars("Task Pane").Visible = False
With ActiveWindow
  .Split = False
  .DocumentMap = False
  .View = wdPrintView
  With .ActivePane
     .View.SeekView = wdSeekMainDocument
     .View.Zoom.PageColumns = 2
     .View.Zoom.PageRows = 1
  End With
End With

End Sub

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Kamran - 24 Jul 2007 19:34 GMT
Thanks for the response.  It seems I'm having the same problem with both
versions:  It doesn't work if Word is in Print Layout mode.  When I switch
first to Normal View, then the macro works.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.