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

show this address list first



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 12th 09, 03:01 PM posted to microsoft.public.outlook.program_vba
Goldy1234
external usenet poster
 
Posts: 4
Default show this address list first

I would like to be able to set a certain address list (a list that exists
under the Outlook Address Book) to be the first list shown in the Outlook
Address Book and when composing messages etc.

Can you give me some sample of code?!
Ads
  #2  
Old June 14th 09, 10:20 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default show this address list first

On the Extended MAPI level (C++ or Delphi only), you would need to call
IAddrBook.SetDefaultDir().
plug Redemption (any programming language, URL below) would let you do
that using RDOAddressBook.DefaultAddressList or RDOAddressList.Default
properties /plug

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Goldy1234" wrote in message
...
I would like to be able to set a certain address list (a list that exists
under the Outlook Address Book) to be the first list shown in the Outlook
Address Book and when composing messages etc.

Can you give me some sample of code?!



  #3  
Old June 15th 09, 10:07 AM posted to microsoft.public.outlook.program_vba
Goldy1234
external usenet poster
 
Posts: 4
Default show this address list first


I'm writing this code in outlook 2003 macro editor (visual basic 6.5). It's
theres a way to do it?
  #4  
Old June 15th 09, 11:52 AM posted to microsoft.public.outlook.program_vba
Goldy1234
external usenet poster
 
Posts: 4
Default show this address list first

OK, I figure it out, but I've got one problem:

in the fild Session\AddressBook\DefaultAddressList\AddressList s there is a
error Error in IABContainer.GetHierarchyTable: MAPI_E_UNKNOWN_FLAGS Error:
An unknown flag was passed into a method.

because of that I can't select adresslist

sample of my code

Set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
Set AddrList = Session.AddressBook.AddressLists.Item("Users")
Session.AddressBook.DefaultAddressList = AddrList


"Goldy1234" wrote:


I'm writing this code in outlook 2003 macro editor (visual basic 6.5). It's
theres a way to do it?

  #5  
Old June 16th 09, 06:54 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default show this address list first

What version of Outlook do you have on that machine?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Goldy1234" wrote in message
...
OK, I figure it out, but I've got one problem:

in the fild Session\AddressBook\DefaultAddressList\AddressList s there is a
error Error in IABContainer.GetHierarchyTable: MAPI_E_UNKNOWN_FLAGS
Error:
An unknown flag was passed into a method.

because of that I can't select adresslist

sample of my code

Set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
Set AddrList = Session.AddressBook.AddressLists.Item("Users")
Session.AddressBook.DefaultAddressList = AddrList


"Goldy1234" wrote:


I'm writing this code in outlook 2003 macro editor (visual basic 6.5).
It's
theres a way to do it?



  #6  
Old June 16th 09, 08:40 AM posted to microsoft.public.outlook.program_vba
Goldy1234
external usenet poster
 
Posts: 4
Default show this address list first

Microsoft Office Outlook 2003 (11.8217.8221) SP3
  #7  
Old June 17th 09, 11:00 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default show this address list first

Send an e-mail to my private e-mail address, I'll send you a debug version
of the dll tha twill create a debug log.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Goldy1234" wrote in message
...
Microsoft Office Outlook 2003 (11.8217.8221) SP3



 




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
Show Contacts above Global Address List in "Show Names from the" L JackieP Outlook - Using Contacts 3 May 8th 08 11:04 PM
Can't show contacts list as an e-mail address book Alan 77056 Outlook - Installation 3 February 24th 08 10:14 PM
How to show contacts in address list? Vasichko Outlook - Using Contacts 3 November 1st 06 08:42 PM
Address book does not show contact list Toad Outlook - Using Contacts 2 August 26th 06 12:13 AM
new additions to my contact list do not show up in my address book Gino Outlook - Using Contacts 5 January 21st 06 10:47 PM


All times are GMT +1. The time now is 08:51 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.