![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am using SQLView to categorize and group my contacts. But for the other people in the company I need to populate shared contacts folders.
I can manually copy from SQLView.. but if I forget to hold ctrl, Outlook will move, causing all my categories to be lost. Now I wish to copy via macro. In that connection, I have two questions: 1) How do I address subfolders with contacts that are NOT below my default contacts ? This will work, but it's not very clear what is happening: Set colcontacts = objNS.Folders(1).Folders(6).Folders(3).Items I thought I could do something like Set colcontacs = objNS.Folders("SQLView\Contacts\Company").Items but I only get "Object not found" What is the correct way of addressing subfolders, from the root of MAPI Namespace ? 2) How do I copy contacts from one folder to another ? I probably need to delete the destination folder first, not to create duplicates. .. obviously, if there's a sync tool that will take from folder A to folder B and check for duplicates, I could use that. But I have only found a tool that has default contacts as destination. Thanks for any help |
Ads |
#2
|
|||
|
|||
![]() 1) Try this: Set Folder=objNs.Folders("SQLView") Set Folder=Folder.Folders("Contacts") Set Folder=Folder.Folders("Company") 2) If you call ContactItem.Copy, a new ContactItem will be returned. Then cal its Move method and pass the folder object. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Thu, 23 Oct 2008 09:16:01 +0100 schrieb myicq: I am using SQLView to categorize and group my contacts. But for the other people in the company I need to populate shared contacts folders. I can manually copy from SQLView.. but if I forget to hold ctrl, Outlook will move, causing all my categories to be lost. Now I wish to copy via macro. In that connection, I have two questions: 1) How do I address subfolders with contacts that are NOT below my default contacts ? This will work, but it's not very clear what is happening: Set colcontacts = objNS.Folders(1).Folders(6).Folders(3).Items I thought I could do something like Set colcontacs = objNS.Folders("SQLView\Contacts\Company").Items but I only get "Object not found" What is the correct way of addressing subfolders, from the root of MAPI Namespace ? 2) How do I copy contacts from one folder to another ? I probably need to delete the destination folder first, not to create duplicates. . obviously, if there's a sync tool that will take from folder A to folder B and check for duplicates, I could use that. But I have only found a tool that has default contacts as destination. Thanks for any help |
#3
|
|||
|
|||
![]() Quote:
Although that is exactly the same, only in 3 different lines ![]() Is there a way to use a path-like notification, like \\SQLView\Contacts\Company or similar ? I think I have seen that somewhere in a post on Outlook VBA code. - Torben. |
#4
|
|||
|
|||
![]() It's not the same, by using the names you know what folder you're going to access. Of course, you can write a function that takes the full path as a parameter; then the function has to split the path to get all of the folder names. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Fri, 24 Oct 2008 08:26:03 +0100 schrieb myicq: 'Michael Bauer [MVP - Outlook Wrote: ;271922']1) Try this: Set Folder=objNs.Folders("SQLView") Set Folder=Folder.Folders("Contacts") Set Folder=Folder.Folders("Company") Thanks.. Although that is exactly the same, only in 3 different lines ![]() Is there a way to use a path-like notification, like \\SQLView\Contacts\Company or similar ? I think I have seen that somewhere in a post on Outlook VBA code. - Torben. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
contact subfolder | wren_head[_2_] | Outlook - Using Contacts | 4 | March 24th 08 03:13 PM |
How do I view a contact subfolder? | wren_head | Outlook - Using Contacts | 1 | March 19th 08 06:24 PM |
makro for adressing more folders | [email protected]\ | Outlook and VBA | 2 | November 18th 07 06:53 PM |
Copy contacts into a subfolder | Info | Outlook - Using Contacts | 2 | July 11th 07 10:11 PM |
Assign public subfolder to contact | [email protected] | Outlook - Using Contacts | 1 | January 25th 06 10:24 PM |