Hi all,
Did some digging in R6 forum and found some great samples for what I want to achieve.
My basic routine is below .... works a treat.
Had issue as detailed by others with the .Display aspect. But many thanks to Edward W Cornies for his workaround, back in 2006 ..!!
Plan to do more research and testing on this but a great start.
Cheers
Andy
Sub Initialize
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Set db = s.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = db.UnProcessedDocuments
Print "Opening instance of MS Outlook"
Set OutlookApp = CreateObject ( "Outlook.Application" )
If IsObject ( OutlookApp ) Then
Set myItem = OutlookApp.CreateItem (0)
With myItem
.to = "TO FIELD POPULATED"
.cc = "CC FIELD POPULATED"
.Subject = "SUBJECT FIELD POPULATED"
Set curdoc = dc.GetFirstDocument
For x = 1 To dc.Count
.body = curdoc.Airline (0).
.body = .body & Chr (10) & curdoc.Make (0)
.body = .body & Chr (10) & curdoc.Model (0)
Set curdoc = dc.GetNextDocument ( curdoc )
Next
' Display Mail to user
On Error Resume Next
.Display
If Err <> 0 Then
If Err <> 207 Then
MessageBox ( "An Error has occurred # :" & Err )
End If
End If
End with
End if
End Sub