Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send a Mail Item Using Access through Lotus Notes

Posted on 1999-07-07
9
Medium Priority
?
361 Views
Last Modified: 2013-12-18
I need to send a Mail Message through Lotus Notes from MS. Access 97. I have found a Lotus Automation but have not figured out how to send it through yet.. Not connecting to the Database and server.. for starters..
here is some code I testing..
Public Sub Test()
Dim s As Object
Dim db As Object
Dim doc As Object
Dim rtitem As Object
Dim nt As Object


' start up Lotus Notes and get object handle

Set s = CreateObject("Notes.NotesSession")
'getDatabase

Set db = s.GETDATABASE(server,database)

Set doc = db.CREATEDOCUMENT

doc.Form = "Memo"
doc.SendTo = "mailaddress.."    'Enter the mail address here
doc.Subject = "This is a test message"        'Enter your subject matter here

' this will build the text part of your mail message

Set rtitem = doc.CREATERICHTEXTITEM("Body")
Call rtitem.APPENDTEXT("The body of the message goes here!")
Call rtitem.ADDNEWLINE(1)

Call doc.Send(False) 'Make sure this parameter stays false


' set all object handles to nothing to release memory

Set doc = Nothing
Set db = Nothing
Set s = Nothing
End Sub
0
Comment
Question by:alcapps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 1

Author Comment

by:alcapps
ID: 1119739
Please Send the answer to albert.capps@firstunion.com That way I can read it during the Day... thanks..
0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119740
I dont see anything wrong with ur code...u r not able to connect to the server that holds your database?
0
 
LVL 1

Author Comment

by:alcapps
ID: 1119741
ghassan99
Yes I can't connect or open the database .. when I get to the line.. GetDatabase..
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:ghassan99
ID: 1119742
start notes, then try your code...then try connecting to a database on the same server which ur current notes client is conntected to...say getdatabase("","names.nsf")
0
 
LVL 1

Author Comment

by:alcapps
ID: 1119743
ghassan99..
I got it to send a message while Lotus Notes.. was up .. I still need to do the begining to this to make it work..
Bring up Lotus notes.. Get access to the mail portion by passing the Password and Sending the message and shuting down Lotus notes... full circle..
So If I bring up Lotus.. and have signed in I now can send a message..
Could you help me with the begining part..??

I put in "C:\notes\data\names.nsf" and it worked fine..

AL

0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119744
I'm sorry there is no way to do this, like supplying the password...u cant bypass the password prompt, as to bring up notes, u can do that in R5.  If u have an R5 client then u can with one click start notes, but then u will have to supply a password.  or if u dont want to use the password u have to do a clear password, which is also a security breach.
0
 
LVL 1

Author Comment

by:alcapps
ID: 1119745
I belive we are using R4.6, How do I get lotus to come up with just the password prompt then.. Thanks for your help so far..

Al
0
 
LVL 3

Expert Comment

by:Gunsen
ID: 1119746
Make sure that you have PATH set to program directory. A valid notes ini-file should also be in your path.This holds the mail-server and point to correct id-file.
ie: PATH=%PATH%;c:\notes\uk46;c:\ini\;
(in this case my ini-file is located at c:\ini\notes.ini - in most cases it's located below c:\windows)
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 600 total points
ID: 1119747
u can start up notes normally when u create a new session object. u must make sure that notes32.tlb is a registered file, which is in your case, u shouldnt have problems instantianting a notes session class. u dont have to specify the full path for the file name, coz the notes session object gets the environment variables from the notes.ini which is usually residing in your windows directory. otherwise u must specify a path for it as gunsen suggested. and for the password prompt, there is no way around it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question