oooh, we get to hold hands!
So your basic objective it to connect to the Notes Database, if there are new calls entered, add this information to the Access Database.
Do you have the Domino Designer? I think your best approach is going to be to have a view that contains all the documents that you need to process (hopefully there already is one, if not this is something that you can add that WILL NOT affect the rest of the program).
Then after Access connects to notes, open that view and loop through the documents and extract the document field information to create your Access INSERT INTO statement and execute it.
Here's some stuff that may help:
Code:
[psuedocode]
Dim notesdb As Object
Dim notesdoc As Object
Dim notesView As Object
Dim i as Integer
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GetDatabase("servername", "database.nsf")
Set notesView = notesdb.GetView( "Name of View to Process" )
For i = 1 to NotesView.EntryCount do
Set notesdoc = view.GetNthDocument(i)
[COLOR=red]'Now you can Access the fields on the document to extract the information for your query; I have included some information from the Notes help showing different methods of getting information from a document:[/color]
Next
[/psuedocode]
1. This example uses the Items property of NotesDocument to get each item in each document in a database view, and displays its name and text representation.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
Forall item In doc.Items
Messagebox item.Name & " = " & item.Text
End Forall
Set doc = view.GetNextDocument(doc)
Wend
End Sub
2. This example uses the GetFirstItem method of NotesDocument to get the Subject item in each document in a database view, and displays its name and text value.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim item As NotesItem
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set doc = view.GetFirstDocument
If doc.HasItem("Subject") Then
While Not(doc Is Nothing)
Set item = doc.GetFirstItem("Subject")
Messagebox item.Name & " = " & item.Text
Set doc = view.GetNextDocument(doc)
Wend
End If
End Sub
3. This example uses the item name as a document property to get the value of the Categories item in each document in a database.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set doc = view.GetFirstDocument
If doc.HasItem("Categories") Then
While Not(doc Is Nothing)
Forall category In doc.Categories
Messagebox category
End Forall
Set doc = view.GetNextDocument(doc)
Wend
End If
End Sub
4. This example uses the GetItemValue method of NotesDocument to get the value of the Subject item in each document in a database.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set doc = view.GetFirstDocument
If doc.HasItem("Subject") Then
While Not(doc Is Nothing)
Forall subject In _
doc.GetItemValue("Subject")
Messagebox subject
End Forall
Set doc = view.GetNextDocument(doc)
Wend
End If
End Sub
5. This example tests for the presence of a specified item in each document in a view.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
itemName = Inputbox("Name of item?")
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
If doc.HasItem(itemName) Then
Messagebox "Item present in document"
Else
Messagebox "Item not present in document"
End If
Set doc = view.GetNextDocument(doc)
Wend
End Sub
That should at least get you started!!
I haven't read anything new lately, been re-reading some things that I have and browsing the used book stores for others that I haven't read in a really long time (I've started collecting the Stephen Lawhead series: Taliesin, Merlin, Arthur, Pendragon, Grail) I read them YEARS ago, and remember how enjoyable they were, so I've got through Arthur - still need to find the other two! It's a very different look at the Arthurian legend, with the main characters promoting Christianity (instead of the "save the old ways" view)
I do like the new look, but like you I wish they would get some of the other features back to functional!
Let me know if you need any more info!!
les