enum PbZoom

R

rodchar

hey all,

i'm trying to set the zoom in my macro. i see the enum PbZoom but not sure
how to use it. i'd like to set the zoom to 100% if i can.

any ideas?

thanks,
rodchar
 
E

Ed Bennett

rodchar said:
i'm trying to set the zoom in my macro. i see the enum PbZoom but not
sure how to use it. i'd like to set the zoom to 100% if i can.

Enums are just list of possible values, you need to use a property or object
that takes the enum as its type.

Going into c:\Program Files\Microsoft Office\Office11\1033\VBAPB10.CHM (the
Object Model Reference) and searching for Zoom brings up the entry for the
Zoom property.

====
Zoom Property
See AlsoApplies ToExampleSpecifics
Returns or sets a PbZoom constant or a value between 10 and 400 indicating
the zoom setting of the specified view. Read/write.
PbZoom can be one of these PbZoom constants.
pbZoomFitSelection Resizes the page view to the size of the current
selection.
pbZoomPageWidth Resizes the page view to the width of the publication.
pbZoomWholePage Resizes the page view to the size of a whole page.

expression.Zoom
expression Required. An expression that returns one of the objects in the
Applies To list.
Example
The following example sets the zoom for the active publication so that the
entire page fits on the screen.
ActiveDocument.ActiveView.Zoom = pbZoomWholePage
====

Clicking Applies To gives the entry for the View object, which is normally
accessed through the ActiveView property of the Document object.

e.g. ActiveDocument.ActiveView.Zoom = pbZoomPageWidth
 

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