Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Apr 2001
    Location
    Johannesburg
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outlook reading pane zoom level

    Hi

    I would like to know how to change the Outlook 2010 reading pane zoom level in VBA code. Any help with this would be appreciated.

    Regards

  2. #2
    Lounger
    Join Date
    Nov 2010
    Posts
    38
    Thanks
    13
    Thanked 0 Times in 0 Posts
    I have not found any persistent solution for the Reading PREVIEW PANE (apparently the beta version Outlook 2010 DID keep the zoom level)

    Here's a vba script I found that will open the email message when double-clicked to 140 zoom level:

    While you are in Outlook do the following

    Press Alt-F11 to invoke the VBA Editor
    On the left side locate ThisOutlookSession
    Double click on ThisOutlookSession
    On the right window of the screen copy and paste the following code
    Click on Save
    Quit VBA Editor Alt-Q

    There are several additional steps to take in Office 2010. Here is the code I use:

    -----
    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 = 140
    End Sub
    -----

    Once you have the code in place, you need to enable the "Microsoft Word 14.0 Object Libary" references in Visual Basic for Applications. You can find that under the Tools menu by choosing the References item and putting a check mark on the library and choosing OK.

    IF YOU DO NOT SIGN THE MACRO, NOTE THE FOLLOWING
    The next issue is that you need to enable unsigned macros for Outlook to actually USE this code. You can find that by going to the File menu in Outlook and choosing Options. In the Options window, choose the "Trust Center" item from the left hand pane and then click the "Trust Center Settings..." button. In the Trust Center window, select "Macro Settings" in the left hand pane and change the Macro Settings to "Notifications for all macros" (or "Enable all macros (not recommended; potentially dangerous code can run)"). The only problem NOW is that you will need to tell Outlook to run the macro each time you start it up (unless you chose "Enable all..."). You can fix THAT by digitally signing the macro (and setting the Macro Settings back to the default "Notifications for digtally signed macros, all other macros disabled"). If you want to do THAT, you first need a certificate (which is a whole OTHER thread) and you need to install the certificate in Active Directory (another entire other thread) and actually sign the macro (another thread) and distribute it (another thread).

    And this doesn't solve the problem in the reading pane...which I still haven't found any way to fix. It does make it so that double-clicking on a message to read it will use the zoom factor set in the code above (I use 140 in the code above)


    For More Info:
    http://social.technet.microsoft.com/...c-e699b244b240
    Last edited by ip45ywre; 2011-09-30 at 14:56.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •