persistent zoom setting for email

J

johnrico

I have seen number of posts on this topic with people having trouble
setting the default zoom on incoming email (Outlook 2007 seems to
remember the zoom setting for composing mail, but not for reading
mail). The following macro will set the zoom every time you open a
mailitem. You can copy and paste it into ThisOutlookSession, and it
will automatically set the zoom to 140%.

Option Explicit
Dim WithEvents objInspectors As Outlook.Inspectors
Dim WithEvents objOpenInspector As Outlook.Inspector
Dim WithEvents objMailItem As Outlook.MailItem
Private Sub Application_Startup()
Set objInspectors = Application.Inspectors
End Sub
Private Sub Application_Quite()
Set objOpenInspector = Nothing
Set objInspectors = Nothing
Set objMailItem = Nothing
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Class = olMail Then
'MsgBox "go!" '(Testing)
Set objMailItem = Inspector.CurrentItem
Set objOpenInspector = Inspector

End If
End Sub
Private Sub objOpenInspector_Close()

Set objMailItem = Nothing
End Sub

Private Sub objOpenInspector_Activate()

'MsgBox "zoom!" '(Testing)
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = 140

End Sub



-John Federico
 

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