I have a spreadsheet which uses VBA to generate an e-mail within the users Lotus Notes account. This is all done via the back door using the code below:
HOWEVER, what I'd like to do is paste data directly into the body of the newly created document. I suspect this may be achievable if I use the UIDOC route but no matter what I try I can't get this to work. Does anyone out there have a magic wand!!!
Many Thanks...
Set session = CreateObject("Notes.NotesSession"
Dim db As Object
Dim o As Object
Dim rtitem As Object
Dim ServerName As String
Dim MailFileName As String
Dim MailFileFound As Boolean
Call GetServerNameAndMailFile(ServerName, MailFileName, MailFileFound)
If Not MailFileFound Then
Exit Sub
End If
' On Error GoTo errormsg:
Set db = session.GetDatabase(ServerName, MailFileName)
'Open your mail file if not already opened
If Not db.IsOpen Then
Call db.openmail
End If
Set doc = db.CreateDocument
doc.Subject = PointsReport.Caption
doc.body = ""
DistList = "&"
doc.SENDTO = ""
doc.COPYTO = ""
doc.sign
Call doc.Save(False, False)
HOWEVER, what I'd like to do is paste data directly into the body of the newly created document. I suspect this may be achievable if I use the UIDOC route but no matter what I try I can't get this to work. Does anyone out there have a magic wand!!!
Many Thanks...
Set session = CreateObject("Notes.NotesSession"
Dim db As Object
Dim o As Object
Dim rtitem As Object
Dim ServerName As String
Dim MailFileName As String
Dim MailFileFound As Boolean
Call GetServerNameAndMailFile(ServerName, MailFileName, MailFileFound)
If Not MailFileFound Then
Exit Sub
End If
' On Error GoTo errormsg:
Set db = session.GetDatabase(ServerName, MailFileName)
'Open your mail file if not already opened
If Not db.IsOpen Then
Call db.openmail
End If
Set doc = db.CreateDocument
doc.Subject = PointsReport.Caption
doc.body = ""
DistList = "&"
doc.SENDTO = ""
doc.COPYTO = ""
doc.sign
Call doc.Save(False, False)