Solved

How to Import and Export data from Outlook to Database...

Posted on 2004-03-22
4
1,297 Views
Last Modified: 2011-09-20
Hallo Experts,

I am having an application(that uses JSP + Postgresql database)..With My application, i can import data from EXCEL into my database fields and also, i can export data from database fields to EXCEL/CSV.

I want to make some enquiries of how it is possible to import data from “Outlook” into my application and how i can export informations from my application into “Outlook”.

I want to know how the export format of “Outlook” looks like (which fields and format --> e.g. are this plain text fields or dropdown boxes …)

How it is possible to combine the content of the “Outlook”-fields with the my applications database fields.

Eagerly waiting for your EARLIER suggestions.

Best Regards,
Jagdeesh.
0
Comment
Question by:jaggybala
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 10647762
you can automate outlook as a COM object but i don't know how to do that in Java

there is an intro to javamail here
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html

hope this helps a bit
0
 

Author Comment

by:jaggybala
ID: 10647782
hi,

 i already use this E-Mail progra for my application, but i dont know how the export format of 'Outlook' looks like and how i can import an EXCEL data from 'Outlook' to my database fields(Postgresql).

- Jagdeesh.
0
 
LVL 44

Accepted Solution

by:
bruintje earned 400 total points
ID: 10647812
if you can use an odbc entry for your postgres db then you could directly add fields to the db with some vbs script like in

source : http://archives.postgresql.org/pgsql-interfaces/1999-08/msg00285.php
snippet:
-----------
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = 1
'DSN USING POSTGRES/ODBC DRIVER FOR WIN32.
Const DSN = "PostgresContacts"
Call Main()
WScript.Quit (0)
Sub Main
      'SET OUTLOOK OBJECTS TO REFER TO ITEMS IN PUBLIC FOLDER
      Set objOutlook = Wscript.CreateObject ("Outlook.Application")
      Set objNameSpace = objOutlook.GetNameSpace("MAPI")
      Set objPublicFolders = objNameSpace.Folders("Public Folders")
      Set objAllPublicFolders = objPublicFolders.Folders("All Public Folders")
      Set ContactItems = objAllPublicFolders..Folders("Some Contacts")
      varSQL =  "Select * From PMStoreContacts"
      varSQL_Del  =  "Delete  From PMStoreContacts "
      'CREATE ADO RECORDSET OBJECT
      Set rsChains = WScript.CreateObject("ADODB.Recordset")
      rsChains.open varSQL_Del, DSN, adOpenStatic, adLockOptimistic
      rsChains.open varSQL, DSN, adOpenStatic, adLockOptimistic
      For Each Item in ContactsItems      
            rsChains.addnew
            rsChains("Project Manager") = Item.SomeField
            ...
            rsChains.Update
            rsChains.movenext
      next
      rsChains.Close
      '****SETTING OBJECTS FOR GETTING OUTLOOK INFORMATION TO NOTHING TO RELEASE THEM FROM MEMORY (sort of...)****
      Set objOutlook = nothing
      Set objNameSpace = nothing
      Set objPublicFolders = nothing
      Set objAllPublicFolders = nothing
      Set ContactsItems = nothing
      '****SET RECORDSET OBJECT TO NOTHING********
      Set rsChains = Nothing
End Sub
-----------

this is a vbs script using the windows scripting host, not sure if you can adapt the idea / ODBC connection to your environment
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question