embed snapshot of form in an email

A

Alex

I have code that sends a Lotus Notes email from a button on an Access form
(which I'm using because SendObject in Access 2000 has a bug). Everything
works fine in the code except I need to send a screen shot of the form that
the button resides in, much like SendObject does. I know how to send an
actual attachment via the code, but I'm not sure how to send the snapshot of
the form. Any ideas are appreciated.

Private Sub SendNotesMail_Click()
Dim s As Object
Dim db As Object
Dim doc As Object
Dim rtItem As Object
Dim Server As String, Database As String
Dim strError As String

'startup Lotus notes and get object handle
Set s = CreateObject("Notes.notesSession")
Server = s.GETENVIRONMENTSTRING("MailServer", True)
Database = s.GETENVIRONMENTSTRING("MailFile", True)
Set db = s.GETDATABASE(Server, Database)

On Error GoTo ErrorLogon
'see if user is logged on
Set doc = db.CREATEDOCUMENT
On Error GoTo 0

doc.Form = "Memo"
doc.importance = "2" '(Where 1=Urgent, 2= Normal, 3= FYI)

'Send an e-mail to
doc.SENDTO = (Me![Vendor1Email])
doc.RETURNRECEIPT = "1"
doc.Subject = "Bid Request"

Set rtItem = doc.CREATERICHTEXTITEM("Body")

Call rtItem.ADDNEWLINE(2)
Call rtItem.ADDNEWLINE(1)
Call rtItem.APPENDTEXT("")

Call doc.send(False)

Set doc = Nothing
Set db = Nothing
Set s = Nothing
Set rtItem = Nothing

ErrorLogon:
If Err.Number = 7063 Then
MsgBox " You must first logon to Lotus Notes"
Set doc = Nothing
Set db = Nothing
Set s = Nothing
Set rtItem = Nothing
End If

Refresh
MsgBox "Your Weld Problem Log has been sent to " & (Me.Vendor1Email)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top