Dynamically Resize a Word 2003 Document

A

Andrew J Fortune

Hi all,

I would like to use VBA to create a macro that will resize and
relocate a Word 2003 document on the screen when it opens up. The
co-ordinates and dimensions of such a document will be specified in
the macro (either hard-coded, or relative to the current screen
resolution).

Ideally, I want to create a new template with this macro embedded, and
set to run as soon as the user opens up a document that is based on
this template.

How can this be done ?

thanks,
Andrew J Fortune,
Melbourne,
Australia
 
P

Peter_A_M (NL)

Hello Andrew,
Wouldn't it be easier just to maxime the document window with the
application window with a statement like:
ActiveWindow.WindowState = wdWindowStateMaximize
which you make part of a macro, or even as Document_Open and/or Document_New
subroutine in the ThisDocument module?

(The Document_Open event happens when opening a previously saved document,
the Document_New event when creating a document from a template; both
subroutines may be included in your specific template.)

Another workaround I think of, would be to set an option to True:
Application.ShowWindowsInTaskbar = True
(but you should like this - I don't).

As to your original question:
I think you could search in VBA Help for Height Property (regarding a Window
Object) and the UsableHeight Property and read what this says.


I hope these suggestions may be of any help to you!
Regards,
Peter
 

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