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 - Using Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

getting the AddressEntry object to update for a Personal Address Book



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 10th 06, 02:31 PM posted to microsoft.public.outlook.contacts
peteshaw
external usenet poster
 
Posts: 1
Default getting the AddressEntry object to update for a Personal Address Book

[getting the AddressEntry object to update for a Personal Address Book]

What I am trying to do is a write a vbscript that will, on userl login,
update any Personal Address Books they may have with the updated entry
in the Global Address List. Currently, I am developing this in VB6 and
I'll port it over to vbscript when I'm done.

The script looks something like


oMAPI.Logon
Set colAddressLists = oMAPI.AddressLists
Set colGALAddressEntries = colAddressLists("Global Address
List").AddressEntries

For Each objAddressList In colAddressLists
if objAddressEntry.type = Case OlDisplayType.olUser
Set objGALAddress =
colGALAddressEntries.Item(objAddressEntry.Name)
objAddressEntry.Type = objGALAddress.Type
objAddressEntry.Address = objGALAddress.Address
objAddressEntry.Update True, True
End If
Next objAddressList

The problem is, that this only updates the address in the PAB if it
happens to be an SMTP type. There doesn't seem to be any visible
properties that allow you to set the property to X.400, SMTP, etc..,
and I don't know how to force the entry to get updated.

Any ideas? I'm really stuck on this, and i know the answer lies in my
poor grasp of the MAPI object model. I should add that I am tryingn to
run this on a machine with Outlook 2003 installed, but I will have to
factor it for Outlook 2000. Any help will be most sincerely
apprecieated, so thankt in advance.

regards
--Peter j. Shaw

Ads
 




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
Address Book MikeXB12X Outlook - General Queries 2 February 17th 06 09:32 PM
Set which local email account can send mail to contacts in address book. (associating an email address with a contact) Scott Streit Outlook - General Queries 3 January 27th 06 03:57 PM
Address book problem! Jeff Needle Outlook - General Queries 4 January 23rd 06 12:31 AM
Offline Address Book Marty Outlook - Installation 5 January 12th 06 06:12 PM
Address book Bob H Outlook - General Queries 5 January 8th 06 07:20 PM


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