Set view percentage of all documents to 200%

N

Nomey

Dear all,

There must be a way to set the view percentage of all open documents to the same value. I'm looking for a way to get a small message box that askes the user to enter the view percentage that is then applied to all open documents in Word XP 2002.

Could you help?

Nomey
 
H

Helmut Weber

Hi Nomey,

documents don't have a zoom factor at all.
Only windows and window panes have.

Have a look at this one:

Sub Test60001()
Dim oDcm As Document
Dim oWnd As Window
Dim oPan As Pane
For Each oDcm In Documents
For Each oWnd In oDcm.Windows
For Each oPan In oWnd.Panes
oPan.View.Zoom.Percentage = 100
Next
Next
Next
End Sub
 
N

Nomey

Hi Helmut,

Thanks. You make ik look so easy. I changed your macro to the following code:

Sub SetZoomForAllDocs()
Dim oDcm As Document
Dim oWnd As Window
Dim oPan As Pane
Dim lngZoom As Long

lngZoom = InputBox("Zoompercentage is?")

For Each oDcm In Documents
For Each oWnd In oDcm.Windows
For Each oPan In oWnd.Panes
oPan.View.Zoom.Percentage = lngZoom
Next
Next
Next
End Sub


It works great!

Nomey
 

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