Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / June 2005

Tip: Looking for answers? Try searching our database.

Sending mail from access using Lotus Notes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 28 Jun 2005 17:19 GMT
Company uses Lotus Notes (R5) for it's mail.  I'm building a database using
access 97.  Boss wants automated reports to be sent via email once certain
critera is met.

I found a solution for Outlook, however I'm unable to find anything
utilizing Lotus notes.  I can call up the program from Access with some
prefilled info, but I'm looking for a complete automated solution (i.e.
press a Command button and everything is done in background)

Any Help is appreciated.  Thanks!
MA - 28 Jun 2005 17:39 GMT
> Company uses Lotus Notes (R5) for it's mail.  I'm building a database
> using access 97.  Boss wants automated reports to be sent via email
[quoted text clipped - 7 lines]
>
> Any Help is appreciated.  Thanks!

Jump the mail client and use cdo.dll

Signature

_ _
Ciao
MAssimiliano Amendola            www.accessgroup.it
Cisa - Conferenza Italiana per Sviluppatori Access
Info:  www.donkarl.com/it

Mike - 28 Jun 2005 21:56 GMT
Thanks for the response, however I've had no experience using CDO.dll  --
Are there any examples I can see or a more detailed explination of how this
would work?

> > Company uses Lotus Notes (R5) for it's mail.  I'm building a database
> > using access 97.  Boss wants automated reports to be sent via email
[quoted text clipped - 16 lines]
> Cisa - Conferenza Italiana per Sviluppatori Access
> Info:  www.donkarl.com/it
SA - 29 Jun 2005 09:43 GMT
Mike:

Take a look at our PDF and Mail Library for Access.  It interfaces with
Lotus Notes to allow you to pretty easily automate sending e-mails; if you
have any of the supported PDF drivers (and some quality ones are very in
expensive like Win2PDF) then you can automate the whole thing with very
little code.  You'll find it in the developer tools area of our web.

HTH
Signature

Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

> Thanks for the response, however I've had no experience using CDO.dll  --
> Are there any examples I can see or a more detailed explination of how
[quoted text clipped - 21 lines]
>> Cisa - Conferenza Italiana per Sviluppatori Access
>> Info:  www.donkarl.com/it
PAT_PENDING - 29 Jun 2005 01:22 GMT
Hey Mike

I use this code with A97 and Notes 6, hopefully it will work for notes 5

You'll need to set a reference to the notes library, do a search for
notes32.tlb on your local machine, Add through Tools->References->Browse and
select the file. This appears in the references list as 'Lotus Notes
Automation Classes'

'Sends an email from Lotus Notes client
Public Function SendNotesEmail(send_to As String, subject As String, message
As String) As Integer
   On Local Error GoTo err_handler

   Dim session As Object
   Dim datab As Object
   Dim Doc As Object
   Dim sMsg As String
   Dim server_name As String
   Dim server_folder As String
   Dim database_name As String
   
   'Set default return value
   SendNotesEmail = NO_ERRORS
   
   
   'Get mail-in database settings (server, path and filename)
   server_name = getPreference(MAIL_SERVER)
   server_folder = getPreference(MAIL_PATH)
   database_name = getPreference(MAIL_DATABASE)
       
   'Start creating email
   Set session = CreateObject("Notes.NotesSession")    'create notes session
   Set datab = session.GETDATABASE(server_name, server_folder & "\" &
database_name)
   Call datab.OPENMAIL                              'set database to
default mail database
   Set Doc = datab.CREATEDOCUMENT                   'notesdocument '.New  
'(db)   ' create a mail document
   
   'Fill in some basic fields
   Call Doc.REPLACEITEMVALUE("SendTo", send_to)
   Call Doc.REPLACEITEMVALUE("Body", message)
   Call Doc.REPLACEITEMVALUE("From", email_address)
   Call Doc.REPLACEITEMVALUE("Subject", subject)
   Call Doc.REPLACEITEMVALUE("ReplyTo", email_address)
   
   'Save a copy of the outgoing message -- this doesn't seem to work

'    Call doc.Save(True)
'    doc.SAVEMESSAGEONSEND = True
   
   'Send the email
   Call Doc.SEND(False)                          'send the message
   
   Set session = Nothing                               ' close connection
to free memory
   Set datab = Nothing
   Set Doc = Nothing
   
   Exit Function
err_handler:
   SendNotesEmail = err.Number
   Resume Next
End Function

If you want file attachements, add these lines before the 'CALL doc.Send
(false)' line

   'We need a rich text item to attach a file (.EmbedObject method is in
RichTextItem class)
   Dim rtItem As Object
   Set rtItem = Doc.CREATERICHTEXTITEM(Doc, "Body")
   Call rtItem.EMBEDOBJECT(1454, "", PATH & "\" & file, "Label to appear as
attachment name")

HTH

> Company uses Lotus Notes (R5) for it's mail.  I'm building a database using
> access 97.  Boss wants automated reports to be sent via email once certain
[quoted text clipped - 6 lines]
>
> Any Help is appreciated.  Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.