RE:MS Word window sizes
RE:MS Word window sizes
- Subject: RE:MS Word window sizes
- From: <email@hidden>
- Date: Sat, 3 Apr 2010 16:31:33 +0000
- Sensitivity: Normal
Hi Timofey,
I'm assuming this is for Word 2008? The code below works for me, although if there's
more than 4 windows then it starts overlapping them. I'm guessing Word only lets you
shrink the windows down to a certain size. Does this work for you?
Jay
--
tell application "Finder" to set {a, b, c, d} to bounds of window of desktop
tell application "Microsoft Word"
activate
set allWordWindows to windows
set numOfWindows to (count allWordWindows)
set locationPoint to (c / numOfWindows) as integer
set leftPoint to 0
set rightPoint to locationPoint
repeat with currentWindow in allWordWindows
tell currentWindow
set bounds to {leftPoint, 22, rightPoint, d}
set view type of view of it to draft view
set page fit of zoom of it to page fit best fit
set track revisions to true
end tell
set leftPoint to (rightPoint + 1)
set rightPoint to (rightPoint + locationPoint)
end repeat
end tell
--
> Hi.
> Being an editor of translations, i often need to have two documents in two different languages open
> side by side. To that end wrote a small script that is intended to check the screen resolution and fit
> all the MS Word's windows side by side. It soon turned out that word can't do that if there are more
> than two documents open. Well, that was not much of a problem, because i only need two. But after
> a while the script stopped working even with two windows! Or, rather, it sometimes works, but,
> more often it doesn't. What can there be wrong?
> Here is the script. I would greatly appreciate your help.
<code>
> And here is the error message I get:
> error "Microsoft Word got an error: Can’t set bounds of window \"072574_en.doc [Compatibility Mode]
> \" to {1, 22, 720, 900}." number -10006 from bounds of window "072574_en.doc [Compatibility Mode]"
> --
> Best Regards,
> Timofey.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden