Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Exporting data to Outlook contacts


This topic is 6682 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a Personnel database currently, and I've received a feature request to allow the export of the data into contact entries in Outlook. Is this possible, and if so, how?

Posted

2 ways of doing this. Productive Computing's Outlook plugin, or use VBscripting.

If it's just creating contacts in Outlook then the VBscript is relatively straightforward. If you also want to update existing contacts then it gets more complex.

Posted

Below is visual basi code to help. The way I would do this is to load the data direct to a vb executable using command line parameters.

In vb create a new .exe, in project properties add reference - ms outlook. the write this code

Private Sub Form_Load()

Dim Ap1Forename As String

Dim Ap1Surname As String

Ap1Forename = Split(Command, ",")(1)

Ap1Surname = Split(Command, ",")(2)

' Start Outlook.

' If it is already running, you'll use the same instance...

Dim olApp As Outlook.Application

Set olApp = CreateObject("Outlook.Application")

' Logon. Doesn't hurt if you are already running and logged on...

Dim olNs As Outlook.NameSpace

Set olNs = olApp.GetNamespace("MAPI")

olNs.Logon

' Create and Open a new contact.

Dim olItem As Outlook.ContactItem

Set olItem = olApp.CreateItem(olContactItem)

' Setup Contact information...

With olItem

.FullName = Ap1Forename &" " & Ap1Surname

.Birthday = "9/15/1975"

.CompanyName = "Microsoft"

.HomeTelephoneNumber = "704-555-8888"

.Email1Address = "[email protected]"

.JobTitle = "Developer"

.HomeAddress = "111 Main St." & vbCr & "Charlotte, NC 28226"

End With

' Save Contact...

olItem.Save

Unload Me

End Sub

The dim statements need to be continued for all the fields you wish to import. And the split( command,)needsz to be continued.

Build your vb project to a runtime.

Then when you run from filemaker using send event (calculation) have the parameters entered after the program with commas in between each data.

This topic is 6682 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.