One click resize window for Word

(1 comment)

Documents loading up in Word generally open in preview layout, which I often find unreadable, but I can not find anyway to default to print mode, and a large number of clicks are involved in changing the view.

Default format for Microsoft Word Document

What I needed was a nice Macro which give me a nice readable view at a single click. Visual Basic used to be used for this kind of thing in Windows. On the mac, you use AppleScript. The following AppleScript tells Word to change the view on the current document and maximise the window.

(* This is a sample applescript that allows you to change the settings of a Word 2008 document in a single click. This one controls the size and location of the window, the view it uses, the degree of zoom, and which toolbars appear. You would need to customize this sample to fit your preferences.

Please see the article at <http://word.mvps.org/mac/scripts/WindowSize.html>

Code provided by MVP Barry Wainwright, presented by MVP Daiya Mitchell in February 2008

USE AT YOUR OWN RISK. Test on dummy documents. Please see <http://word.mvps.org/mac/scripts/>

Tested in OS X 10.4.11 (PPC) and Office 2008
*)


tell application "Microsoft Word"
    activate
    --first set the window size. Run the GetWindowSize script to find your preferred {a, b, c, d} to substitute in this line
    set bounds of active window to {43, 55, 1276, 821}
    --set the View. Instead of "page view", you can substitute any of the following: normal view/draft view/outline view/page view/master view/online view
    set view type of view of active window to print view
    --then set the zoom; to comment out a line, type -- at the begining; delete -- to make the line active. 
    --zoom by percentage, replace 150 with your preference
    --set percentage of zoom of view of active window to 178
    --if you want to zoom Page Width, uncomment the next line, and comment out the percentage line
    set page fit of zoom of view of active window to page fit best fit
    --if you want to zoom Whole Page, uncomment the next line, and comment out the percentage line
    --set page fit of zoom of view of active window to page fit full page
    --for certain purposes, you might want to activate a toolbar. Use the names in View>Customize Toolbars to substitute for "Reviewing" here, and uncomment the command bar line
    set visible of command bar "Reviewing" to true
end tell

This will change the view as shown in the following image:

The document is readable once the view has changed

Fine, but I did not want to have to look for this script in the finder every time I opened up a new document in Word. I wanted to put it in an easy to access location, that is the scripts menu:

The Scripts Menu

To get the script here, you need to load it into the word scripts folder in your Library directory. You don't need to find this though, as if you click on the scripts menu, you can select to open this folder.

The Word scripts folder can be opened easily

Currently unrated

Comments

Jason Thorne 1 year, 3 months ago

I used to use Applescript in the late 1990s. It was handy, but very unreliable. Tasks such as this is what it was good for.

Link | Reply
Currently unrated

New Comment

required

required (not published)

optional