elford Posted July 28, 2006 Posted July 28, 2006 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?
Wim Decorte Posted July 29, 2006 Posted July 29, 2006 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.
stefanshotton Posted July 30, 2006 Posted July 30, 2006 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.
Wim Decorte Posted July 31, 2006 Posted July 31, 2006 No need for VB, you can use pretty much the same code from VBscript.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now