General discussion

Locked

Getting Records from Outlook to Access

By nancyv ·
I have created an Outlook Custom Task Form which contains user-defined fields on pages 2 and 3. These two pages are marked for displaying. The normal OL Task Form page 1 has been marked for not displaying. I can add a task record in Outlook 2000 using this new form. The form is also published to the Organizations forms library. I tried to use File Export to create a .cvs file for exporting to Access. It comes up with a field mapping screen. The screen just contains the standard fields which are the ones that are actually suppose to be hidden on page 1 of the form. The user-defined fields are not displaying, and they are not exporting to the .csv file. I want the contents of the user defined fields to go to MS Access. Any suggestions as to how to get this data over from Outlook 2000 to MS Access 97?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

Getting Records from Outlook to Access

by Stillatit In reply to Getting Records from Outl ...

User-defined fields take special handling. You will need to write (or find) a program which walks through the records and exports the fields you need.

Special warning -- if your custom fields can contain carriage-return codes, those characters will destroy the integrity of a .csv (comma separated values) file.

Good luck.

Collapse -

Getting Records from Outlook to Access

by nancyv In reply to Getting Records from Outl ...

I still have the same original question. I'm wondering how to get data from new fields created in Outlook 2000 out to an Access table. Thanks.

Collapse -

Getting Records from Outlook to Access

by nancyv In reply to Getting Records from Outl ...

I gather from reading the posting from Stillatit that the normal Outlook export will not work for user defined fields. When you mentioned using another program to export these records, I'm wondering how to do this from within Outlook. Would this be an add-on program? Where would I begin to look for such a program. Thanks for any input you may have. I will delay rating the answer received at this time as the solution has not been achieved.

Collapse -

Getting Records from Outlook to Access

by Stillatit In reply to Getting Records from Outl ...

When you post a comment without rating an answer, the answerer does not get notified.

I am emailing you a program fragemt which shows how it is done.

The guts (for other random readers) are as follows:

Dim myNameSpace As Object
Dim ContactItems As Object
Set myolApp = CreateObject("Outlook.Application")
Set myNameSpace = myolApp.GetNamespace("MAPI")
Set Myfolder= myNameSpace.Folders("My folder name")
Set ContactItems = myfolder.Items
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")
...
ExcelSheet.Application.Cells(locRowNumber, 21).Value = itm.HomeAddressState
...
ExcelSheet.Application.Cells(locRowNumber, 89).Value = itm.UserProperties.Find("MailStatus").Value


-----------
The example above for MailStatus shows how to access the user-defined field and shove it into an Excel spreadsheet, which you can import into Access. From Excel you can export to a .csv, or you can import the Excel spreadsheet to Access.

Good luck.

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums