Problem importing data to Microsoft Outlook

Jacob-Bushnell

Registered User.
Local time
Today, 11:44
Joined
May 29, 2003
Messages
14
Hi, I am trying to import data from a MS DB to an Outlook contact file.
I know it seems odd but I need this so several of my co-workers can store address on their Palm-Pilots.
Any way, my problem is that it doesn't seem to recognize my Primary-Key (Auto-Number) field after I have imported the data.
I need that field so we can remember and find records quickly by just jotting down the number.
Does anyone have an Idea how to get around this?
Thanks a lot! Jacob
 
Importing Outlook Contacts into MS Access - Problem Creating Unique ID in Table

Hi there,

I'm trying to go the other way. I'm using Outlook to store all my contacts.

In Access I've imported a Linked Table linking directly to my Outlook contacts.

However, I can't Create a Unique ID.

I want to import from Outlook, then use a unique ID to track what products and services the client is asking for in my Access databse.

So far, the best I've come up with is to do an Append Query and append the linked Contacts table data to a new table that has a ClientID autonumber field.

However, I'd need to do this every time a new contact was added to keep the data up-to-date.

Did you ever find out how to solve your problem?

I think you may be able to get around it by opening your Contacts folder in MS Outlook and clicking on "Customize Current View".

Of course, if you're not using Outlook 2003 (xp) it will be differnet.

You can Add a user-defined field to you contacts by clicking on Cutomizing the current view.

1. Click Fields
2. Under the heading: "Select Available Fields From", click on the side arrow and scroll down until you find the option "user-defined fields in folder" and select.
3. Click the New Field button and setup the new field like an autonumber field (i.e. with a long intger data type).

Hope that works!

Hope you can help me solve me problem.
 
Thanks Curious, but I was never ablr to figure it out. I ended up abanding the project... :(
Thanks for the tip! I am sorry but I am not able to help you...
 
This works

This will update outlook from access. Adjust fields as needed, there are more than I have listed. If outlook is not open, the update will not occur until after outlook is open and updates. This could take a minute or two.


Code:
Dim olApp As Outlook.Application
Dim olNameSpace As Outlook.NameSpace
Dim objContact As Outlook.ContactItem

Set olApp = New Outlook.Application
Set olNameSpace = olApp.GetNamespace("MAPI")
Set objContact = olApp.CreateItem(olContactItem)

With objContact
.User1 = Me.IDContact
If Me.Body > "" Then .Body = Me.Body
If Me.Buisiness2TelephoneNumber > "" Then .Business2TelephoneNumber = Me.Buisiness2TelephoneNumber
If Me.BuisinessAddress > "" Then .BusinessAddress = Me.BuisinessAddress
If Me.BuisinessAddressCity > "" Then .BusinessAddressCity = Me.BuisinessAddressCity
If Me.BuisinessAddressPostalCode > "" Then .BusinessAddressPostalCode = Me.BuisinessAddressPostalCode
If Me.BuisinessAddressPostOfficeBox > "" Then .BusinessAddressPostOfficeBox = Me.BuisinessAddressPostOfficeBox
If Me.BuisinessAddressState > "" Then .BusinessAddressState = Me.BuisinessAddressState
If Me.BuisinessAddressStreet > "" Then .BusinessAddressStreet = Me.BuisinessAddressStreet
If Me.BuisinessFaxTelephoneNumber > "" Then .BusinessFaxNumber = Me.BuisinessFaxTelephoneNumber
If Me.BuisinessHomepage > "" Then .BusinessHomePage = Me.BuisinessHomepage
If Me.BuisinessTelephoneNumber > "" Then .BusinessTelephoneNumber = Me.BuisinessTelephoneNumber
If Me.CallbackTelephoneNumber > "" Then .CallbackTelephoneNumber = Me.CallbackTelephoneNumber
If Me.CellTelephoneNumber > "" Then .CarTelephoneNumber = Me.CellTelephoneNumber
If Me.CompanyName > "" Then .CompanyName = Me.CompanyName
If Me.EMail1Address > "" Then .EMail1Address = Me.EMail1Address
If Me.EMail2Address > "" Then .EMail2Address = Me.EMail2Address
If Me.EMail3Address > "" Then .EMail3Address = Me.EMail3Address
If Me.FirstName > "" Then .FirstName = Me.FirstName
If Me.FullName > "" Then .FullName = Me.FullName
If Me.Home2TelephoneNumber > "" Then .Home2TelephoneNumber = Me.Home2TelephoneNumber
If Me.HomeAddress > "" Then .HomeAddress = Me.HomeAddress
If Me.HomeAddressCity > "" Then .HomeAddressCity = Me.HomeAddressCity
If Me.HomeAddressPostalCode > "" Then .HomeAddressPostalCode = Me.HomeAddressPostalCode
If Me.HomeAddressPostOfficeBox > "" Then .HomeAddressPostOfficeBox = Me.HomeAddressPostOfficeBox
If Me.HomeAddressState > "" Then .HomeAddressState = Me.HomeAddressState
If Me.HomeAddressStreet > "" Then .HomeAddressStreet = Me.HomeAddressStreet
If Me.HomeFaxTelephoneNumber > "" Then .HomeFaxNumber = Me.HomeFaxTelephoneNumber
If Me.HomeTelephoneNumber > "" Then .HomeTelephoneNumber = Me.HomeTelephoneNumber
If Me.JobTitle > "" Then .JobTitle = Me.JobTitle
If Me.LastName > "" Then .LastName = Me.LastName
If Me.MailingAddress > "" Then .MailingAddress = Me.MailingAddress
If Me.MailingAddressCity > "" Then .MailingAddressCity = Me.MailingAddressCity
If Me.MailingAddressPostalCode > "" Then .MailingAddressPostalCode = Me.MailingAddressPostalCode
If Me.MailingAddressPostOfficeBox > "" Then .MailingAddressPostOfficeBox = Me.MailingAddressPostOfficeBox
If Me.MailingAddressState > "" Then .MailingAddressState = Me.MailingAddressState
If Me.MailingAddressStreet > "" Then .MailingAddressStreet = Me.MailingAddressStreet
If Me.MiddleName > "" Then .MiddleName = Me.MiddleName
If Me.MobileTelephoneNumber > "" Then .MobileTelephoneNumber = Me.MobileTelephoneNumber
If Me.PlantLocation > "" Then .OfficeLocation = Me.PlantLocation
If Me.OtherAddress > "" Then .OtherAddress = Me.OtherAddress
If Me.OtherAddressCity > "" Then .OtherAddressCity = Me.OtherAddressCity
If Me.OtherAddressPostalCode > "" Then .OtherAddressPostalCode = Me.OtherAddressPostalCode
If Me.OtherAddressPostOfficeBox > "" Then .OtherAddressPostOfficeBox = Me.OtherAddressPostOfficeBox
If Me.OtherAddressState > "" Then .OtherAddressState = Me.OtherAddressState
If Me.OtherAddressStreet > "" Then .OtherAddressStreet = Me.OtherAddressStreet
If Me.OtherFaxTelephoneNumber > "" Then .OtherFaxNumber = Me.OtherFaxTelephoneNumber
If Me.OtherTelephoneNumber > "" Then .OtherTelephoneNumber = Me.OtherTelephoneNumber
If Me.PagerTelephoneNumber > "" Then .PagerNumber = Me.PagerTelephoneNumber
If Me.PrimaryTelephoneNumber > "" Then .PrimaryTelephoneNumber = Me.PrimaryTelephoneNumber
If Me.RadioTelephoneNumber > "" Then .RadioTelephoneNumber = Me.RadioTelephoneNumber
If Me.Suffix > "" Then .Suffix = Me.Suffix
If Me.TelexTelephoneNumber > "" Then .TelexNumber = Me.TelexTelephoneNumber
If Me.Title > "" Then .Title = Me.Title
If Me.WebPage > "" Then .WebPage = Me.WebPage
.Close olSave
End With

Set objContact = Nothing
Set olNameSpace = Nothing
olApp.Quit
Set olApp = Nothing
 
Robgould

Thanks for the routine, works a treat.

Do you know of any flags that I can include that will over write existing contatcts rather add them as it is set to now?

Cheers

KevinM
 

Users who are viewing this thread

Back
Top Bottom