A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Anyone have a sample macro for Outlook 2007 (setting the zoom)?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 10th 09, 01:54 PM posted to microsoft.public.outlook.program_vba
Dick
external usenet poster
 
Posts: 25
Default Anyone have a sample macro for Outlook 2007 (setting the zoom)?

I'd like to find a sample macro for OUtlook 2007. Ideally would be one that
sets the szoom level on a message, but I'll take any sample macro and wtry to
work with it.

I would just record a macro, but recording seems to have been disabled in
some earlier verion of Outlook. Thanks!
  #2  
Old April 10th 09, 02:19 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Anyone have a sample macro for Outlook 2007 (setting the zoom)?

Unlike Word or Excel, Outlook has never had a macro recorder. You always
have had to write your own macros from scratch in Outlook since VBA was
added to it.

Since Outlook 2007 uses WordMail setting zoom percentage would have to be
handled using Word object model code, however in this case the object model
exposed for mail items doesn't allow you to do that. The code:

Application.ActiveInspector.WordEditor.ActiveWindo w.View.Zoom.Percentage
= 125

will just throw an error.

The best you could do with a macro would be to call to open the zoom dialog
in an email item. The actual zoom setting would have to be set manually.
That code would look like this, assuming the item was opened and had focus:

Application.ActiveInspector.CommandBars.ExecuteMso ("ZoomDialog")

That will execute the ribbon control that opens the zoom dialog.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Dick" wrote in message
news
I'd like to find a sample macro for OUtlook 2007. Ideally would be one
that
sets the szoom level on a message, but I'll take any sample macro and wtry
to
work with it.

I would just record a macro, but recording seems to have been disabled in
some earlier verion of Outlook. Thanks!


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default on Zoom Gene L. Outlook - General Queries 0 July 23rd 08 10:35 PM
Please help. Can't get the submit to create Task in outlook sample doc4a Outlook - Using Forms 2 July 18th 08 05:31 PM
Sample Outlook 2003 PRF File markj Outlook - Installation 2 December 17th 07 04:29 PM
Zoom Calendar david4009 Outlook - Calandaring 1 November 9th 07 08:38 PM
Change default zoom setting when scheduling appointments Jonathan Outlook - Calandaring 0 January 8th 06 11:09 AM


All times are GMT +1. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.