1. Close Outlook
2. Start regedit and change PublishCOMAddin to 1
HKEY_CURRENT_USER\Software\Genius@Work\GeniusConnect\Settings
Key:PublishCOMAddin
Default=0, Set to 1 to make COM interface visible in COMAddin office object for VBA or other Add-ins
3.Start Outlook
Methods:
Button Param:
IDS_BUTTON_SETUP 33002 //Config dialog
IDS_BUTTON_STORE 33006 //Store selected item(s)
IDS_BUTTON_LOAD 33010//Load selected item(s)
IDS_BUTTON_LOADALL 33014//Load All (current folder)
IDS_BUTTON_STOREALL 33019//Store All (current folder)
IDS_BUTTON_THLP 33020//Start Help
IDS_BUTTON_MAILING 33024//Start Mailing
Example Code:GeniusConnect ver 5.0.0.8 and lower:
Public Sub StartConfigDialog()
Dim addIn As COMAddIn
Set addIn = Application.COMAddIns.Item("OutlookConnect.OutlookConnection.1")
If Not (addIn Is Nothing) Then
addIn.Object.OnBarClick 33002
End If
End Sub
GeniusConnect 5.0.0.9 and higher:Public Sub StartConfigDialog()
Dim addIn As COMAddIn
Set addIn = Application.COMAddIns.Item("GeniusConnectSync.Connect")
Dim GC As Object
Set GC = addIn.Object
If Not (GC Is Nothing) Then
GC.OnBarClick 33002
End If
End Sub
SyncFolder(IDispatch* pFolder, int nDirection)pFolder param:
MAPIFolder object
nDirection param:
0=Load All
1=Load selected
2=Save All
3=Save Selected
4=Load and Stora All
5=Store and Load All
Example Code:GeniusConnect ver 5.0.0.8 and lower:
Public Sub LoadAllContacts()
Dim addIn As COMAddIn
Set addIn = Application.COMAddIns.Item("OutlookConnect.OutlookConnection.1")
Dim objFolder As Outlook.MAPIFolder
Set objFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
If Not (addIn Is Nothing) Then
addIn.Object.SyncFolder objFolder, 0
End If
End Sub
GeniusConnect 5.0.0.9 and higher:Public Sub LoadAllContacts()
Dim addIn As COMAddIn
Dim GC As Object
Set addIn = Application.COMAddIns.Item("GeniusConnectSync.Connect")
Set GC = addIn.Object
Dim objFolder As Outlook.MAPIFolder
Set objFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
If Not (GC Is Nothing) Then
GC.SyncFolder objFolder, 0
End If
End Sub