PC Review


Reply
Thread Tools Rate Thread

embed snapshot of form in an email

 
 
=?Utf-8?B?QWxleA==?=
Guest
Posts: n/a
 
      8th Nov 2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Snapshot - Exporting Report to Snapshot Jorge Rite Microsoft Access Form Coding 2 7th Oct 2005 01:01 AM
Embed Linked pdf, jpg or snapshot Object to Powerpoint Presentati =?Utf-8?B?Q2hlbCBC?= Microsoft Powerpoint 0 18th Mar 2005 04:27 PM
Save each page as a seperate Snapshot file when Exporting to Snapshot Format Ed Dobbin Microsoft Access External Data 0 14th May 2004 01:12 PM
Viewing Snapshot Files with Snapshot Viewer Control on Excel Userform...How? Shuffs Microsoft Excel Programming 0 19th Sep 2003 05:09 PM
Bug: Apparently Report Snapshot will not embed in Excel under Win XP robc Microsoft Access Reports 0 25th Aug 2003 03:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:46 PM.