Default zoom ratio

D

DeanH

Yes is this answer and the articlae you have attached explains how to set the
default in the templates, but what it does not say is a couple of issues that
can affect your results:
1. When saving, the article says to add a space, delete space then save. I
have found that this does not always work, so I always add a space, save,
delete space, save. This ensures that changes have been saved to the template
and/or document.

2. Also that the zoom setting is a document attribute so once a document has
been saved at a different zoom from the template, this is how it will be view
upon opening regardless on the setting in the template. So do the change
zoom, add space, save, delete space, in the document itself.

Once you have your templates zoom setting as you want it, all new documents
created will be to your requirements, point 2 will apply to the old documents
previously created.

Hope this helps
DeanH
 
S

Stefan Blom

To force *any* document opened in Word to a certain zoom (and view), you can
use the following auto macros in normal.dot:

Sub AutoOpen()
With ActiveWindow.View
.Type = 3 ' Print Layout view (use 1 for Normal view)
.Zoom = 100 ' specify the desired percentage
End With

End Sub

Sub AutoNew()
With ActiveWindow.View
.Type = 3 ' Print Layout view (use 1 for Normal view)
.Zoom = 100 ' specify the desired percentage
End With

For more, see http://www.gmayor.com/installing_macro.htm.
 
H

Herbert Eppel

Splendid, thank you (I think I need another "End Sub" at the end, right?).

However, I note that I already have macros under these names as follows:

Sub AutoOpen()
Dim v As Variable
For Each v In ActiveDocument.Variables
If v.Name = "ShowDM" Then
If ActiveDocument.Variables("ShowDM") = "yes" Then
ActiveWindow.DocumentMap = True
Else
ActiveWindow.DocumentMap = False
End If
Exit Sub
End If
Next v

ActiveWindow.DocumentMap = False
End Sub

Sub AutoNew()
Dim v As Variable
For Each v In ActiveDocument.Variables
If v.Name = "ShowDM" Then
If ActiveDocument.Variables("ShowDM") = "yes" Then
ActiveWindow.DocumentMap = True
Else
ActiveWindow.DocumentMap = False
End If
Exit Sub
End If
Next v

ActiveWindow.DocumentMap = False
End Sub

I'm not sure how I acquired these and I'm not really sure what they do
(obviously something to do with DocumentMap, but I'm not sure what
exactly...), and I'm minded to delete them.

Is there anything I should be aware of before deleting these existing
macros?

Thank you.

Herbert Eppel
www.HETranslation.co.uk
 
S

Stefan Blom

Herbert Eppel said:
Splendid, thank you (I think I need another "End Sub" at the end, right?).

Of course, both macros should end with "End Sub." I apologize for any
confusion!
However, I note that I already have macros under these names as follows:

Sub AutoOpen()
Dim v As Variable
For Each v In ActiveDocument.Variables
If v.Name = "ShowDM" Then
If ActiveDocument.Variables("ShowDM") = "yes" Then
ActiveWindow.DocumentMap = True
Else
ActiveWindow.DocumentMap = False
End If
Exit Sub
End If
Next v

ActiveWindow.DocumentMap = False
End Sub

Sub AutoNew()
Dim v As Variable
For Each v In ActiveDocument.Variables
If v.Name = "ShowDM" Then
If ActiveDocument.Variables("ShowDM") = "yes" Then
ActiveWindow.DocumentMap = True
Else
ActiveWindow.DocumentMap = False
End If
Exit Sub
End If
Next v

ActiveWindow.DocumentMap = False
End Sub

I'm not sure how I acquired these and I'm not really sure what they do
(obviously something to do with DocumentMap, but I'm not sure what
exactly...), and I'm minded to delete them.

Is there anything I should be aware of before deleting these existing
macros?

The code you posted seems to make use of a document variable to determine if
the Document Map should display or not. It will not cause any trouble if you
delete it.

If you want to keep the old code, just add the new code within the existing
Sub and End Sub statements.

--
Stefan Blom
Microsoft Word MVP
 
H

Herbert Eppel

The code you posted seems to make use of a document variable to determine if
the Document Map should display or not. It will not cause any trouble if you
delete it.

If you want to keep the old code, just add the new code within the existing
Sub and End Sub statements.

Thanks, I'll do that.

By the way, the AutoNew macro you posted earlier seems to work for new
documents opened from within Word (i.e. when Word is already open), but
not on Word start-up (in which case a new document is opened with a 100%
zoom factor, rather than my user-defined zoom factor).

This isn't a big issue because I was mainly interested in setting a
user-defined zoom factor for existing documents, but I am nevertheless
curious about the difference in the AutoNew behaviour.

Regards

Herbert Eppel
www.HETranslation.co.uk
 
S

Suzanne S. Barnhill

To change the default zoom on Blank Documents, you need to set the zoom in
Normal.dot (or use an AutoExec macro).
 
H

Herbert Eppel

Hi Suzanne,

Thanks for your reply.

Yes, I implemented the AutoNew macro and it works OK now, including on
Word start-up (I have no idea why earlier today it only worked for new
documents opened from within Word, but not on Word start-up...)

Anyway, it all works 'as advertised' now :cool:

Regards

Herbert Eppel
www.HETranslation.co.uk
 
H

Herbert Eppel

Actually, the anomaly I reported on Thursday still exists.

This is what happens:

Word 2000 correctly applies the default zoom ratio I set in normal.dot
via the AutoOpen and AutoNew when I open existing documents and for new
documents opened from within Word (i.e. when Word is already running),
but on startup Word seems to remember the last zoom ratio that was set
before exiting Word, i.e. it opens a new document with that last zoom
ratio rather than the zoom ratio set in AutoNew.

Any comments?

Herbert
 
T

Terry Farrell

That's because AutoNew only runs when you open a New document and not when
you open old documents for editing. You need to edit the macro as an
AutoOpen which will run on opening any document.

Terry
 
H

Herbert Eppel

Hi Terry,

Thanks for your reply, but I already have AutoOpen set and it works OK
(see my previous message).

AutoNew also works OK for new documents opened from within Word, but it
doesn't work when I *start* Word, in which case Word opens a new
document with the last zoom ratio it had set when Word was closed (see
my previous message).

Not a big issue, I'm just curious...

Herbert Eppel
www.HETranslation.co.uk
 
H

Herbert Eppel

Sorry, it seems I didn't read your previous message properly where you
mentioned AutoExec.

So far I implemented the AutoOpen and AutoNew macros recommended by
Stefan, but I don't have an AutoExec macro for this.

Presumably the procedure similar, i.e. perhaps I could simply add the
following to normal.dot

Sub AutoExec()
With ActiveWindow.View
.Type = 3 ' Print Layout view (use 1 for Normal view)
.Zoom = 100 ' specify the desired percentage
End With

Or do I need to do something different?

Thank you.

Herbert Eppel
www.HETranslation.co.uk
 
S

Suzanne S. Barnhill

If the macro works in AutoNew and AutoOpen, it should work in AutoExec as
well.
 
S

Stefan Blom

I believe AutoExec runs before there is an open document, which explains the
error message you are seeing.
 

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