home | get Sue’s code | forums | share code | registration

More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

Login

login
password
Remember me

You will need to register and log in if you want to download the source code for the Microsoft Outlook Programming book. The forums and code sharing areas are open to both registered and non-registered visitors.

share code 09-Feb-2010 10:16

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

 

Code level: advanced    Code area: Code Essentials Printer Friendly Version
Title: WMI script to set Outlook Address Book order
Description: The WMI scripting engine's ability to iterate registry subkeys makes it very useful to Outlook profile work. This sample, my first WMI script, sets the Outlook Address Book order to File As (Last, First) or First Last, depending on your choices.
Date: 10-Mar-2005  07:52
Code level: advanced
Code area: Code Essentials
Posted by: Sue Mosher
Body:
All 30comments
Page [ 1 2 3 Next >>  
  10-Mar-2005  15:55   
The code is VBScript. Copy into Notepad, save with a .vbs file name, and run it to execute the script.
  30-Mar-2005  10:26   
For a good introduction to WMI scripting, see http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting06112002.asp

For another WMI script to set the new and reply/forward signatures for all email accounts in a profile, see http://www.outlookcode.com/codedetail.aspx?id=821
 
  04-Apr-2005  07:11   
I tried to use this this script with outlook 2003 and no luck....
  04-Apr-2005  07:14   
Works fine here. DId you check to see whether the registry value had changed after you ran the script? Errors or other symptoms?
  18-May-2005  04:14   
Does this also work for users with limited rights?
  18-May-2005  08:14   
It should work, since the only portion of the registry you're modifying is that for the mail profile in HKCU, which users must have the rights to modify. (If they didn't, a whole lot of Outlook features wouldn't work at all.)
  24-Jun-2005  05:09   
Thanks, great.
But: not familiar to wmi, sorry. Any known limitations? OS-restrictions for using that?
No details needed (but would make me even happier), but may be there's a big an definitive "NO GO" somewhere?
Thx in advance.
  01-Jul-2005  11:35   
Benthal, I'm still a WMI novice myself, but these look like good resources:

WMI Overview
http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_dieu.mspx

WMI Scripting Primer
http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting06112002.asp
 
  07-Sep-2005  08:24   
Does this script work for other Outlook languages different from English?
  07-Sep-2005  10:02   
Since the registry values involved are not localized, I would expect it to work. However, the only way to know for certain is to try it: Let us know what you find out.

You probably would, of course, want to change the MsgBox text.
Page [ 1 2 3 Next >>  
Post your comment



name        email