Accessing folder 'Other Contacts'

I am programming in VBA

Several users are using Outlook in a network environment. Each of them hat 
its own 'Contacts'. They have shared their addresslists so that I can lookup 
en change the contacts fields from my workstation.

I would like to access these Contactlists by using VBA. Therefor, i found 
via the help function some code and tried to open the contact of a user 
called 'DE DAUW' and whose contacts I can see in the 'Other Contacts'. 
Impossible to get into the 'DE DAUW' addresslist. 

Who can help me ?

    Dim MyApp As Outlook.Application
    Dim MyNameSpace As Outlook.Namespace
    Dim MyFolder As Outlook.MAPIFolder
    Dim MyItemsCollection As Object
    Dim myItem As Object
    Dim MyMatchingItem As Object
    Dim myNewFolder  As Outlook.MAPIFolder
    Dim myAddressLists As AddressLists
    Dim myAddressList As AddressList

    Set MyApp = CreateObject("Outlook.Application")
    Set MyNameSpace = MyApp.GetNamespace("MAPI")
    MyNameSpace.Logon

    Set MyFolder = MyNameSpace.GetDefaultFolder(olFolderContacts)
    Set myNewFolder = 
MyNameSpace.GetDefaultFolder(olFolderContacts).Folders(1)
    Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")

    Debug.Print
    Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
    Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" & myNewFolder.Name
0
Utf
5/6/2010 11:58:01 AM
outlook.program_vba 490 articles. 0 followers. Follow

1 Replies
727 Views

Similar Articles

[PageSpeed] 41

Look at the Namespace.GetSharedDefaultFolder method.

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"Rudy" <Rudy@discussions.microsoft.com> wrote in message 
news:8AED479E-22F6-44A3-A695-77107E1DA0CC@microsoft.com...
>I am programming in VBA
>
> Several users are using Outlook in a network environment. Each of them hat
> its own 'Contacts'. They have shared their addresslists so that I can 
> lookup
> en change the contacts fields from my workstation.
>
> I would like to access these Contactlists by using VBA. Therefor, i found
> via the help function some code and tried to open the contact of a user
> called 'DE DAUW' and whose contacts I can see in the 'Other Contacts'.
> Impossible to get into the 'DE DAUW' addresslist.
>
> Who can help me ?
>
>    Dim MyApp As Outlook.Application
>    Dim MyNameSpace As Outlook.Namespace
>    Dim MyFolder As Outlook.MAPIFolder
>    Dim MyItemsCollection As Object
>    Dim myItem As Object
>    Dim MyMatchingItem As Object
>    Dim myNewFolder  As Outlook.MAPIFolder
>    Dim myAddressLists As AddressLists
>    Dim myAddressList As AddressList
>
>    Set MyApp = CreateObject("Outlook.Application")
>    Set MyNameSpace = MyApp.GetNamespace("MAPI")
>    MyNameSpace.Logon
>
>    Set MyFolder = MyNameSpace.GetDefaultFolder(olFolderContacts)
>    Set myNewFolder =
> MyNameSpace.GetDefaultFolder(olFolderContacts).Folders(1)
>    Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")
>
>    Debug.Print
>    Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
>    Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" & 
> myNewFolder.Name 


0
Dmitry
5/6/2010 5:51:13 PM
Reply:

Similar Artilces:

PUBLIC CONTACTS #4
I created a publix Contact list for all my users and gave them rights to create but not delet.Also I gave myself fun right . When we creat a new contact and try to save it I get an error: "the item could not be saved to this folder. The folder has been deleted or moved, or you do not have permission. Do you want to save a copy of it in the default folder for the item?" Can anyone help me with this proble ? Thank you!! Mike wrote: > I created a publix Contact list for all my users and gave them rights to > create but not delet.Also I gave myself fun right . > When we...

Outlook 2003 forgets contacts after 1 day
Outlook 2003 is remembering contacts for a day and then automatically deleting them. I have spent the last hour searching and can't find the right setting to stop this from happening. Has anyone got any advice? Outlook does not automatically save Contacts ever. To what feature are you referring? Autocompletion? -- Russ Valentine "slycbod" <slycbod@discussions.microsoft.com> wrote in message news:36DBB238-7462-452F-85EB-15258BCD8B05@microsoft.com... > Outlook 2003 is remembering contacts for a day and then automatically > deleting them. I have spent th...

making an equation in access
Hi, I would like to create a field that works out a formula based on other fields. i.e field z=field4, when field 1<field 2 - field 3 etc. Yes, it may be a silly question but I am only new to this....Thanks, Dani. Dani, recommend against creating a "field" in a table and storing this value. One of the generally accepted rules of relational database development is not to store a "computed" (any value that is based on the value of other fields in your database) value in the table. It is a waste of database space, and will eventually result in bad data (...

How do I export my emails and folders from Outlook to Thunderbird
I'm trying to export my email from and all personal folders from Outlook to Thunderbird. Any help would be appreciated. Thanks, Sam ...

Sync net folder problem
I am sharing my calendar to my workmate with net folder. My PC is Win XP and Office 2000 and my workmate's is Win 98 and also Office 2000. I always find that My calender can't be updated from my workmate when I return office after I've taken my notebook for a few days. Can't net folder sync. data offline? Thx. your attention. Ken So Net Folders uses e-mail messages to send updates between computers so naturally you would have to be connected to your e-mail to get any updates. When you leave the office and are not connected you won't get any updates but as soon as ...

Using Excel spreadsheet as input to Access
Hello, I posted this in the New Users forum but only got one answer, so thought I'd try here as well. Like so many others, I am an Excel newbie. I was a mainframe COBO programmer in another life, but that was a few years back My manager would like me to write an app that will take tracking dat from an existing Excel spreadsheet (generated by our system) but onl use a select handful of columns as input to a new Access database tha I will create. I'm guessing that I can either a) create a new edited spreadsheet to b used as input to the Access database or b) use the Import wiza...

Mounting exchange 2000 public folder store on exchange 2003
I have been told that this is not best practice we have gone ahead and done this we where having a great deal of difficulty getting the public folders to replicate. The public folder mail box was incorrectly named I used ADSIedit to change the mail box name in AD but this didn't work. So in the end we went for a dirty fix (users had lost access to public folders for one day already) and dismounted then copied the exchange 2000 public databases to the 2003 box and mounted them there with apparent success. I'm wondering if anyone has any experience with this? Can I expect this s...

Recovering Contacts from BackUp Exec
I need to recover a contacts file from Backup Exec into Exchange but, the contacts file is from an older version of Exchange (2000 small business) and the backup was taken using an older version of Backup Exec (Version8.5), and I've since upgraded our Exchange to Enterprise 2003. While Backup Exec 8.5 allows me to redirect the files, I would like to know if any has anyone had any experience of a similar scenario? I suspect this will work, but don't wish to take any chances. Any help would be appreciated. Mark. "contacts file "? Do you mean the contacts...

Outlook98
I am using Outlook98 and all of a sudden, all the folders I have set up and been using over the past several years, have dissapeared. I believe the PST file is the same size, but the folders and their contents are nowhere to be found. How big is the .PST file? -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:1029601c3f42b$1ace3ac0$a101280a@phx.gbl, Kurt Wolfe wrote: > I am using Outlook98 and all of a sudden, all the folders > I have set up and been usi...

sharing folders in outlook
After setting up my outlook contact files to be shared via email, I sent a test email to myself asking if I wanted to accept the sharing utility. However on the email that was sent I am supposed to click on an 'accept' button to start sharing, however there is no 'accept' button present. There is a note that says if the button is not present I need to install the 'net folder component' however I have searched the microsoft site and cannot find any relevent installation advice. Does anyone have any ideas? What version of Outlook "Donna" <anonymous@di...

MS Outllook 2003 with Business Contact Manager Backup/Restores
Need some help with what the procedure is to backup Business Contact Manager data from a single user license system and restore it on another backup system I have. This needs to include the opportunities and other data linkages made on the system being backed up. Tried doing an export / import but based on some info I saw on the MS Office Web site this won't work! Would appreciate any help! There is a backup/restore function for the BCM database on the file menu. -- Guy Lapierre www.forefrontbusinesssolutions.com "WHY" <Hnyda@mindspring.com> wrote in message n...

Access To Word Mailmerge
I have setup a Mailmerge that is run from Access. The process works like this: 1) The proper record is selected in an Access form which automatically starts the process. 2) Word is called up automatically, it shows both the template and the doument with the proper data in it. 3) Access is closed automatically. 4) The user then needs to close the mailmerge template. 5) The document with the proper mailmerge information inserted from Access is up on the screen. At this point a shortcut is triggered by the user that adds a document of the users choice to the end of the curre...

Outlook Web Access HTTP 500 and HTTP 404 errors
hi, I am experiencing this problem on Exchange 2003 on Windows 2003, when the users try to authenticate to Outlook Web Access, they get the following error messages in their browsers, "http 500 - internal server error" or "http error 404 - file or directory not found", the customer upgraded to windows/exchange 2003 6 months ago from windows/Exchange 2000 (in place upgrade), they only discovered the problem last week when they tried creating new users, i created 3 test users and the 3 users were getting the above errors. some already existing users have no prob...

red recovery drive folder
So I got a virus on my computer a month ago and I had a friend from geek squad come over and restart it with a recovery disk that Dell had sent me (I have a dell) after it was restored and the virus was gone my recovery folder was red and switched to my C: drive, and my os is now D: drive. When I asked him about the recovery drive being red he just told me that "its a good thing" but now when I go to download things for school onto my computer they wont stay, they download but stop right before its finished and I can't find it anywhere. I really need my computer properl...

telnet client in access form
Hello. I am trying to creat a form for work that involves connecting to a telnet server to automatically send and retreive specified data. I am new to VB and I am not sure why my code is not working... anybody help me out? Here is the code that seems to be generating the error: Private Sub Form_Open(Cancel As Integer) telnet.RemoteHost = "HOST" telnet.RemotePort = 23 End Sub (obviously i have replaced removed the host name since i am posting this) ...

Problems updating Access 2003 Database
We currently use an Access 2003 data base to create and send forms within the organization. We are seeing instances where the new records are not appending and believe it may be the query that is causing the issue. The INSERT query is: INSERT INTO table_headerdata ( wso_num ) SELECT Max([table_headerdata]![wso_num])+1 AS Expr1 FROM table_headerdata WHERE wso_num < 1000000; We would appreciate any help to resolve this issue. On Fri, 4 Jan 2008 16:50:00 -0800, ehess00 <ehess00@discussions.microsoft.com> wrote: >We currently use an Access 2003 data base to create and send for...

Can I use the same driver in all versions of Access or Sqlserver
Hello,I have got a question,I wonder if i can use the same driver as Access2000 to get the data from all versions of Access database,my code connected to Access2000 is as follows: "m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;DataSource="+s.m_database,"","",adModeUnknown); Is this code available for other versions of Access? If not,can anyone tell me the correct code for Access2002.Access2003,Access97? my code connected to Sqlserver2000 is as follow: m_pConnection->Open(Provider=SQLOLEDB.1;Persist Security Info=True;Password="+s.m_pass...

Error message
I cannot create a new folder on an external HDD. Win XP Pro, SP3. I go to My Computer, and select the external HDD letter. Then go over to the right-hand pane, right click and select New, then Folder. This produces an error message "Unable to create the folder 'New Folder' The file or directory is corrupted and unreadable." I can save and retrieve a Word document all right to this same external HDD. I can use the above method to create a new folder on the desktop, and on the two HDDs that are internal to the computer. Virus and malware scans are negati...

Outlook blocked access to the potentially unsafe objects: package
Hi, We get a warning prompt while sending a mail with another emails as attachments. It says "outlook found potentially unsafe objects" message. All the attachments in the email are MSG format files. I know the procedure to allow unsafe file attachments but the error message says "unsafe objects". How do I allow sending mails with unsafe objects?? -Chandu If you try to send the same message in Plain Text format, do you still get that error? If so, there is probably an object within your message that is triggering the error. Things like Stationery and Si...

how do I show text on quick access toolbar
Using MS Office 2007. I would l ike to show text instead of icons on the quick access toolbar. On Mon, 15 Feb 2010 14:00:05 -0800, Mothomas <Mothomas@discussions.microsoft.com> wrote: >Using MS Office 2007. I would l ike to show text instead of icons on the >quick access toolbar. Sorry, Microsoft has not made that possible. Maybe you could instead customize the ribbon. See http://gregmaxey.mvps.org/Customize_Ribbon.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the...

Access crash
Hello! Is there a way to crash an ms access db in order to have the dialog box 'Send Error Report'? Thanks for any suggestion. On Tue, 26 Jan 2010 20:03:22 +0100, "Patrick" <patrick@hotmail.com> wrote: >Hello! > >Is there a way to crash an ms access db in order to have the dialog box >'Send Error Report'? > >Thanks for any suggestion. > It's like this time I was visiting my brother in Sydney, Australia. I'm from Seattle, and I told him I would love to see a kangaroo in the wild. He agreed to try. The...

One contact related to multiple accounts
Is it possible to connect an contact to multiple account records. Sorry again, but not at this stage, A contact is associated with a single 'primary' account. However, if via an Opportunity you are dealing with many "contacts", you can link them in to the opportunity. Guy. PS - you may wish to review the C360 (www.c360.com) module (Relationship Chart) as this may satisfy your requirements. "Pieter Versteijnen" <pieterv@infosupport.com> wrote in message news:a84a9335.0410270338.3d392e3f@posting.google.com... > Is it possible to connect an contact to ...

Outlook 2003 w/ Business Contact Manager question
We recently upgraded our Outlook to 2003 and are interested in adding in the Business Contact Manager software. My question is this: We DO NOT have a server, can Business Contact Manager be shared? I know that Outlook 2003 has a way that you can share schedules over a Free/Busy service that Microsoft offers for free. Can this be done with Business Contact Manager? HELP!! To my knowledge a BCM database can't be shared at this point. BCM does have its own newsgroup at: microsoft.public.outlook.bcm. -- Guy Lapierre www.forefrontbusinesssolutions.com "Dawn" <anon...

Extracting Data from Access dB to Excel, using VBA
Hi All, Firstly, I'm an amateur on a steep learning curve, so please excuse me if some of my terminology/understanding is incomplete. I have found a VBA procedure which will extract entire tables from a db to a grid array in an excel spreadsheet. The procedure relies on two cell values, one identifies the database path, the other identifies the required table. When the procedure is run, it evaluates the two values and returns the specified table in its entirety. The problem I am having is that it works perfectly for tables that have no 'dead-space', ie blank fi...

OWA Access #7
Hi All, I have an exchange fornt/backend configuration setup. All users currently accessing OWA are all fine except one user who cannot seem to login to OWA via any browser. When he is prompted to put in his user name and password nothing happens. He will keep on trying till he exceeds the # of logon attempts then he is kicked out with erorr 404 or page expired message. There is nothing special about his user acct than the others yet we cannot seems to log him on. He doesnt even go pass the password prompt. Any ideas? Thanks ...