Hello,
thank you Jay Freedman for the macros. They work great in Word 2010.
Is it possible to get the macros working in Outlook 2010 for the Message text?
a) Navigation Pane Normal and Reading Pane Bottom/Right
b) Message/E-Mail opened in second Window
c) Writing a new Message/E-Mail
References:
https;//msdn,microsoft,com/en-us/library/office/ff834873(v=office.14).aspx
For b) and c) I found the following thread where they use the "Microsoft Word 14.0 Object Libary" as reference:
https;//social,technet,microsoft,com/Forums/office/en-US/46ca9a02-fdb8-4f59-b2bc-e699b244b240/outlook-2010-preview-pane
Then I added my functions to change the zoom level while writing a new Message/E-Mail:
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 = 100
End Sub
' My functions
Private Sub ZoomIn()
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
If wdDoc.Windows(1).Panes(1).View.Zoom.Percentage < 450 Then
wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = wdDoc.Windows(1).Panes(1).View.Zoom.Percentage + 10
Else
MsgBox "Maximum Zoom level reached"
End If
End Sub
Private Sub ZoomOut()
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
If wdDoc.Windows(1).Panes(1).View.Zoom.Percentage > 20 Then
wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = wdDoc.Windows(1).Panes(1).View.Zoom.Percentage - 10
Else
MsgBox "Minimum Zoom level reached"
End If
End Sub
Private Sub ZoomDefault()
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = 100
End Sub
Sub GetZoomLevel()
Dim z As Integer
Dim wdDoc As Word.Document
Set wdDoc = objOpenInspector.WordEditor
z = wdDoc.Windows(1).Panes(1).View.Zoom.Percentage
MsgBox "Current Zoom level: " & z & "%"
End Sub
' My functions end
Finally I added my 4 functions to the "Quick Access Toolbar" of and existing and a new Message/E-Mail and assigned 4 icons.
-
Edited by
blueice_haller
18 hours 57 minutes ago