Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Peter Milczarek 16.Apr.09 01:27 PM a Web browser
General 6.5.5 FP3; 6.5.5 FP2; 6.5.5 FP1; 6.5.5 Windows XP


Hi, trying to copy data from Notes into Access....

Basically I want to search for an email by subject line, and then copy the body of that email into Access (if even possible).

I am testing by searching for the subject and then grabbing the subject line and copying that into a table in Access called Temporary.

The code is bombing out at the line Set NotesDoc = NotesEntry.Document() getting error message "object required" This just recently started happening...prior to this error, the code would finish, but would not insert the "subject" into the access table...I am a rookie with this and am not sure what to do next...

Below is the code..any help is much appreciated!

'Set up DAO (Data Access Objects) using an object called RecordSet to hold Table
Dim Temporary As DAO.Recordset
'Use existing "Temporary" table
Set Temporary = CurrentDb.OpenRecordset("Temporary")


'Set up objects required for automation into lotus notes
Dim Session As Object
Dim NotesDB As Object
Dim NotesView As Object
Dim NotesEntry As Object
Dim NotesDoc As Object

Dim docCollection As Object


'Start a session to notes
Set Session = CreateObject("Notes.NotesSession")
'Open database
Set NotesDB = Session.GetDatabase("PIMAIL02/MAIL12/PUTNAMINV", "MAIL\FIXEDINCDATA.nsf")
'Check if open
If NotesDB.IsOpen = True Then
'Do nothing
Else
NotesDB.OPENMAIL
End If


Set NotesView = NotesDB.GetView("Inbox")

Set docCollection = NotesDB.search("subject = ""FIDW cycle issues""", Nothing, 0)
Set NotesEntry = docCollection.GetFirstDocument()

While Not (NotesEntry Is Nothing)
Set NotesDoc = NotesEntry.Document()

Subject = NotesDoc.GetFirstItem("subject").Values


TemporaryMail.AddNew
TemporaryMail!Subject = Subject(0)
TemporaryMail.Update


Set NotesEntry = NotesView.GetNextDocument(NotesEntry)
Wend


TemporaryMail.Close


MsgBox "Finished"


Set Session = Nothing
Set NotesDB = Nothing

End Function






Notes to MS Access - copy fields in... (Peter Milczarek... 16.Apr.09)
. . RE: Notes to MS Access - copy field... (Stan Rogers 16.Apr.09)
. . . . RE: Notes to MS Access - copy field... (Peter Milczarek... 20.Apr.09)
. . RE: Notes to MS Access - copy field... (Carlos L Rivera... 16.Apr.09)
. . . . RE: Notes to MS Access - copy field... (Peter Milczarek... 20.Apr.09)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite