Dec 10, '03 09:52:00AM • Contributed by: Anonymous
tell application "Microsoft Word"
set winrect to bounds of 1st window
set x to 1st item in winrect
set y to 2nd item in winrect
set w to (3rd item in winrect) - x
set h to (4th item in winrect) - y
set winlist to every window
repeat with curwin in every item in winlist
tell curwin
set currect to bounds of curwin
set curx to 1st item in currect
set cury to 2nd item in currect
set curw to (3rd item in currect) - curx
set curh to (4th item in currect) - cury
-- swap the commenting of the next two lines
-- if you want horizontals to match too
set bounds of curwin to {curx, y, curx + curw, y + h}
--set bounds of curwin to {x, y, x + w, y + h}
end tell
end repeat
end tell
Note: if you have multiple displays, you'll need to swap the comments on the set lines as indicated in the script, or it could possibly position windows completely off of any display ... this will make it match horizontal position & size as well.
