RVF said:
I have a text box that stores the e-mail adress of people. I want to be able
to click on it and have it dump that e-mail address in to the "To" box of my
mail. Currently I cut and paste which is aggravating and opens up the chance
of deleting the name.
So how can I set up my access data base to accomplist this.
I haven't used this in at least 6 years and don't have Notes to even test
it, but here goes:
To send email try the same kind of method. The following is an example using
Lotus Notes. You can try out various sites that give example for using
Outlook, Netscape mail, etc...
The code might not be perfect, but it might save you some time. Not all
these will are necessary, just delete what you don't need.
Global NotesSession As Object
Global NotesMaildb As Object
Global NotesMailDoc As Object
Global NotesFileAttachment As Object
Global NotesRichTextItem As Object
Global NotesItem As Object
' Initialize Notes Objects
Set NotesSession = CreateObject("Notes.NotesSession")
'Set NotesMaildb = NotesSession.GetDatabase("SIN_MAIL_01",
"mail\KVENUGOP.nsf")
Set NotesMaildb = NotesSession.GetDatabase("", "")
NotesMaildb.OpenMail
Put the following in a Module
Set NotesMailDoc = NotesMaildb.CreateDocument
'Function syntax - EmbedObject(type, Class, source, [name])
'Set NotesFileAttachment = NotesRichTextItem.EmbedObject(0, "",
"C:\Test.htm")
NotesMailDoc.SaveMessageOnSend = True
NotesMailDoc.SendTo = "
[email protected]"
NotesMailDoc.from = NotesSession.UserName
NotesMailDoc.Subject = "Test mail"
NotesMailDoc.Body = "This is a sample mail to check the OLE
functionality to send mail. _
This mail has a file attached."
NotesMailDoc.Send
Remember to do this for all the objects open before you exit
Set NotesView = Nothing
Set NotesMaildb = Nothing
Set NotesSession = Nothing
Set NotesMailDoc = Nothing
Set NotesFileAttachment = Nothing
Set NotesRichTextItem = Nothing
As I remember, you also need something called VIM.dll to get the Windows OS
to make the call to Notes. I could be wrong about this detail. You could try
looking on the Lotus Notes website to see if they have any other
information.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access