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]...
 

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