Document map zoom

P

PeterH

n Word 2007, I can zoom the document map by pressing SHIFT-F6 and then using
the zoom bar at the bottom of the Word window.

However, the macro recorder will not record this action.
How can the action be done programmatically, i.e. in VBA ?
 
S

Stefan Blom

There might be a better way, but this macro seems to work:

Sub ZoomDocMap()
On Error GoTo errhandler
SendKeys "{ESC}", True
ActiveDocument.ActiveWindow.DocumentMap = True
SendKeys "+{F6}", True
ActiveWindow.View.Zoom = 200 'Specify the desired zoom
SendKeys "{ESC}", True

errhandler:
Exit Sub

End Sub

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
Top