Remembering document-specific window position

E

Ed

Certain of my editing tasks involve having multiple open docs in Word.
Given limited screen real estate, I carefully size the windows before
setting to work, which is a pain.

I'd like to write up or find a macro that would, on a
document-by-document basis (very important), save the window
size/position for that particular document on closing, then, on
reopening, have Word get the window properties from the individual doc
template or information and restore to the saved position. Ideally,
I'd load this in Normal.dot and invoke it with a keystroke combo as an
alternative way to close docs. Is there a way to do this?

I've searched high and low, but can't find anything on how to do it
with VBA (I'm in Word 2002 on WinXP, with VB 6.3). I know it's
possible because so many apps do it (including WordPerfect back in the
day when I used it), but I don't know if it's doable in VBA. The only
thing I find in online VBA resources is discussion of saving the
/application/'s main window position and writing to the registry to do
so -- but that's not what I'm seeking.

Any ideas? TIA,

Ed

ed [at] coherenow.com
 
H

Helmut Weber

Hi Ed,

nothing much to say, except that you have to store
top-, left- and width-property of a window somewhere.
Read the values whenever you like and apply them,
unless you can put all in an algorithm,
like if windows.count = 3 then ...

But, top, left and width are properties of a window,
not of a document. So the bigger task might be, to
make sure, that the right doc is in the right window.

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top