Introduction
ContactSharing4OL
is an Add-in for Outlook through file server shared contacts item of Outlook in office area. It is a VSTO project developed in Visual Studio using C#.
Background
It is a simple tool to attach contacts data (file base) between Outlook and file server that made it a Global address book for Outlook. Once add-in is ready with file server configured, click button 'Global Contacts' will pop up the dialog box which will allow you to select recipients.
How Add-in Works
Step 1
Using Visual Studio, create Outlook Add-in project and add new item of Ribbon
(XML).
Step 2
Below, add custom button at Outlook inspector.
public string GetCustomUI(string ribbonID)
{
switch (ribbonID)
{
case "Microsoft.Outlook.Mail.Compose":
return GetResourceText("ContactSharing4OL.MailComposeInspectorRibbon.xml");
default:
return null;
}
}
Code of ContactSharing4OL.MailComposeInspectorRibbon.xml. My custom button is added in default ribbon group "TabNewMailMessage
" before "GroupClipboard
". So, button will position at top of left.
="1.0"="UTF-8"
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabNewMailMessage">
<group id="group1" label="ContactSharing" insertBeforeMso="GroupClipboard">
<button id="GlobalContactBtn" onAction="GlobalContactInspectorRibbonBtn_Click"
label="Global Contacts" size="large" getImage="GetGlobalImg"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Step 3
Once Outook startup add-in will synchronize changed contacts data from server, if local empty will copy all data from server.
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
}
Points of Interest
Although Microsoft does not provide Address Book Provider API for C#, we can through other activities' API to call what to do in Outlook. Here, I successfully made Address book, it is good for users to achieve Address book functionality without Exchange, Lotus Notes email system.
History
- 30th June, 2016: Initial release
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.