Description
Set zoom percentage
Syntax
Page.ViewZoomPct (int1) |
int1
percentage
Remarks
Returns error code.
Example
<ShellCommand(CanExecute:="Ena_IsWindowActive")> _
Public Sub ViewZoomPctDlg()
Dim iZoom As String
Dim iMinZoom, iMaxZoom As Integer
iZoom = CStr(Page.GetViewZoom)
Dim iZoomX As Long = Page.ViewGetMetrics(0)
Dim iZoomY As Long = Page.ViewGetMetrics(1)
iMinZoom = 8
iMaxZoom = 6700
Do While 1 = 1
iZoom = InputBox("Set zoom (8-6700):", "Zoom", iZoom)
If IsNumeric(iZoom) Then
If ((CInt(iZoom)) > 7 And (CInt(iZoom)) < 6701) Then
Page.ViewZoomPct(CInt(iZoom))
Page.ViewPositionAt(iZoomX, iZoomY, False)
Exit Do
End If
Else
If iZoom = "" Then Exit Do
MsgBox("Enter only one number in range 8 - 6700!", vbExclamation, "Zoom")
End If
Loop
End Sub
Context
Page designer
See also