none
Set Outlook's 'show this address list first' option. Outlook 2013 RRS feed

  • Question

  • Good day!

    Help pls. Need some script in PS. 

    i found some. but don't work

    $outlook = $(New-Object -ComObject Outlook.Application)
    $Session = $outlook.Session
    $Session.Logon()
    $ab = $Session.AddressLists | ? {$_.Name -eq 'mylist'}
    $abdialog = $Session.GetSelectNamesDialog()
    $abdialog.InitialAddressList = $ab


    ну я такой прихожу и мур, мур, мур!

    Tuesday, June 28, 2016 8:47 AM

Answers

  • This functionality is not exposed in the Outlook Object Model.

    1. Extended MAPI (C++ or Delphi) - IAddrBook::GetDefaultDir / SetDefaultDir

    2. Redemption (any language) - RDOAddressBook.DefaultAddressList (read/write)


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, June 28, 2016 3:11 PM
  • Thank you.

    The Outlook object model doesn't provide any method or property for that. As a workaround you may consider using a low-level API on which Outlook is based on - Extended MAPI. The SetDefaultDir method of the IAddrBook interface allows to establish a new default address book container. Here is what MSDN states for the method:

    The default container is the container that the user sees displayed in the address book when the address book is first opened. SetDefaultDir saves the default container as an entry in the profile. The container remains as the default until either another call to SetDefaultDir is made in the same session or in another session, or the container is removed.


    [custom.development]

    Wednesday, June 29, 2016 6:31 AM

All replies