- Start – Microsoft Office – Tools and Microsoft Office – a digital certificate for the Project VBA, create a certificate with the name, for example, Zoom
- Start Outlook
- File – Options – Trust Center – Trust Center Settings – Options, select Macros, or “notice for all macros” or “notification for digitally signed macros, all unsigned macros are disabled”
- Alt-F11 – run the VBA Editor
- In the upper left window, click on the Draft Project – MS Outlook Object and double-click on ThisOutlookSession
- To the right opens a window (
View.Zoom.Percentage = 150 - scale
by default)
- Tools – References, check Microsoft Word 14.0 Object Library
- F5 – come up with a name, for example, “Zoom – Create”
- Tools – Digital Signature: select the signature that we have previously created with the name of Zoom
- File – save
- Alt-Q
- Restart Outlook
- Box appears with a request to add to the trusted zone certificate and enjoy.
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_Quit()
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
Set objMailItem = Inspector.CurrentItem
Set objOpenInspector = Inspector
End If
End Sub
Private Sub objOpenInspector_Close()
Set objMailItem = Nothing
End Sub
Private Sub objOpenInspector_Activate()
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = 150
End Sub