Sync Microsoft Outlook with my own data?

限于喜欢 提交于 2019-12-01 14:09:06

If you really talk about "synchronization" then you should take a look at Microsoft Sync Framework. http://msdn.microsoft.com/en-us/sync/default

This framework helps out with everything that relates to synchronization, what happens when same data has changed in both places, and so on. And they have lots of "providers", for example Outlook are one "provider" that you can use to synk items between your own data and outlook.

Contact Synchronization Sample (C#)

From msdn:
This sample shows how custom providers can be created to synchronize content between disparate data sources. In this sample we will synchronize Contacts between Microsoft Outlook, Vista Contacts and VCard files. A key aspect of this demo is the data mapping capabilities which enables disparate data sources and data types to be mapped appropriately through the Sync Framework

http://archive.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=613

Or the good old way...:
If you just want to add some contact or meeting then the old office interopt is good enough, here are an quick example, 11 rows of code to add a contact:

    Dim OutlookApp As Outlook.Application = New Outlook.Application
    Dim OutlookNameSpace As Outlook.NameSpace = OutlookApp.GetNamespace("MAPI")
    OutlookNameSpace.Logon()

    Dim Contacts As Outlook.MAPIFolder = OutlookNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)

    Dim newContact As Outlook.ContactItem = OutlookApp.CreateItem(Outlook.OlItemType.olContactItem)
    newContact.FullName = "Stefan Karlsson"
    newContact.Email1Address = "myemail@mail.com"
    newContact.BusinessHomePage = "www.example.com"
    newContact.Save()

    OutlookApp.Logoff()
    OutlookApp.Quit()

(You have to add reference to Microsoft.Office.Interop.Outlook and add this imports to your code for the example to work)

Imports Microsoft.Office.Interop

You may also find helpful a free Outlook add-in used for synchronizing Outlook and Gmail accounts and contacts: http://scand.com/products/outlook4gmail/index.html. I found it a week ago and have been using ever since for Outlook 2007, though it can be used for Outlook 2010 as well. The features are really useful.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!