Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Extract header info & message to Access DB

Posted on 1999-07-20
Medium Priority
Last Modified: 2013-12-18
We are creating an Access app to use to track & repond to problems users are having with our HR system and also to request queries & reports.  They currently eamil us at a department box.   We want to extract this information daily into Access tables as automatically as is possible.

How is this done?
Question by:JPSAYRE
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
1 Comment

Accepted Solution

MW earned 200 total points
ID: 1119919
Create a script agent using ODBC to fill the MS Access db.
I guess the department box is a mail-in database.
The difficulty are the body fields. It actually would make sense to create
three agents.

1. Agent1 would run on "new arrived email" and would execute agent2 and agent3
2. Agent2 would be a formula agent running again on "new arrived email".
The formula would be: FIELD BodyText := @Abstract([TextOnly];999;"Body")
3. The third agent would be a script agent running "Once command may be used"
with the following example code:

Sub Initialise
     Dim session  As NotesSession
     Dim curDB    As NotesDatabase
     Dim view     As NotesView
     Dim Doc      As NotesDocument

     Dim con      As ODBCConnection
     Dim qry      As ODBCQuery
     Dim res      As ODBCResultSet

     Set session = New notessession
     Set curDB   = session.CurrentDatabase
     Set view    = curDB.GetView("$Inbox")
     Set con = New ODBCConnection
     Set qry = New ODBCQuery
     Set res = New ODBCResultSet
     con.SilentMode = True
     If Not con.ConnectTo("ODBCConnectionName", "UserName", "Password") Then
         Exit Sub
     End If
     Set qry.Connection = con      
     Set doc = view.GetFirstDocument

     Do While Not doc Is Nothing
         qry.SQL = | INSERT AccessTableName
                     SET    From = | & doc.From(0) & |,
                            Subject = | & doc.Subject(0) & |,
                            Text = | & doc.BodyText(0) & |,
         Set res.Query = qry
         Call res.execute
         If Not res.GetError() = DBstsSuccess Then
            Exit Sub
         End If
         Call doc.removefromfolder("$Inbox")
         Set doc = view.getfirstdocument
End Sub

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

670 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