You can learn a lot by using the object browser (f2), switch from <All
libraries> to Outlook. There you can get help and code samples for every
object and its methods, just select one and press f1. For instance, select
ContactItem in the left pane, then its Copy function in the right pane, then
press f1.
If the Public Folders are visible in your Outlook, you can access them
through the Folders collection of the Namespace object.
Instead of looping through all of the contacts in the public folder, you
could use the Restrict function of the Items collection, and filter for
LastModifiedDate in order to get only those items modified since your last
sync. After a sync. you need to store that value anywhere.
In order to access your personal contacts folder, see the GetDefaultFolder
function.
--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>
Am Thu, 07 Jan 2010 16:03:21 -0500 schrieb Phil G:
> Our company stores a list of company contacts in:
>
> Public Folders->All Public Folders->xxx Corp->yyyy-> Company Contacts
>
> Every start up I would like a macro to copy these contacts to a sub folder
of the local contacts called "Company Contacts". (So they sync with our
blackberry's). If the program could be smart enough to only update the
subfolder that would be great (check for changes and make those, not copy
every contact every time), but not necessary.
>
> I don't know visual basic, but I would be willing to look at a couple
basic tutorials to figure this out.
>
> Thanks in advance..
> Submitted using http://www.outlookforums.com