I hv created a listbox with 2 columns whereby display all the email addresses in first column and names on the second column. I want to send an email by selecting email address and it will open lotus email. Once the email is open, the email address will auto add to the send to field. May I know is it possible to do in such a matter as I explained?If yes, so how to go about it? pls help..tks..
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
send lotus note email from listbox (a97)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » send lotus note email from listbox (a97)
- This topic has 22 replies, 5 voices, and was last updated 20 years, 9 months ago.
AuthorTopicWSnuglorious
AskWoody LoungerMay 22, 2003 at 3:17 am #387900Viewing 0 reply threadsAuthorReplies-
WSready4data
AskWoody LoungerMay 22, 2003 at 7:23 pm #678990I have some code that will send emails using Lotus notes 5.0 from within Access. The email address portion of your listbox is no problem but what do you want to place in the subject line and the body of the email. Where will this info come from? Otherwise you will be sending a blank email to someone.
-
WSnuglorious
AskWoody LoungerMay 23, 2003 at 12:46 am #679063Tht means besides of just create to open lotus email, it can also do more than tht? At first, I was thought only once the lotus email is open, I will key in there in the subject line and the body of the email. If Access can do include the subject line and body as well, then what if i create 2 textbox to input subject line and another for body of the email? Is that what I understanding is correct. If so, I can send email direct from Access instead?
-
WSready4data
AskWoody LoungerMay 23, 2003 at 11:01 am #679152 -
WSDAC
AskWoody Lounger -
WSready4data
AskWoody LoungerMarch 11, 2004 at 6:49 pm #797762Brian,
I never had to check for that since we use Lotus company wide.
don’t know if this is want you want but….
you can use a hyperlink to bring up the default mail client
e.g. mailto: Me@woodys.com
the link will open up your default mail client -
WSready4data
AskWoody LoungerMarch 11, 2004 at 6:49 pm #797763Brian,
I never had to check for that since we use Lotus company wide.
don’t know if this is want you want but….
you can use a hyperlink to bring up the default mail client
e.g. mailto: Me@woodys.com
the link will open up your default mail client
-
-
-
WSDAC
AskWoody Lounger -
WSpatt
AskWoody LoungerJuly 10, 2004 at 9:39 pm #848672Can someone tell me how to send an attachment with the code that is used to send an email in this database. The following code comes from that database.
Private Sub cmdSEND_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 Dim Item As String Dim strWHERE As Variant Dim strEMAIL As String Dim strSUBJECT As String Dim strMSG As String If Me.lstEMAIL.ItemsSelected.Count = 0 Then MsgBox "You must select at least destination" Exit Sub End If strWHERE = strWHERE & lstEMAIL.Column(0, Item) strSUBJECT = strSUBJECT & lstEMAIL.Column(1, Item) strMSG = strMSG & lstEMAIL.Column(2, Item) ' start up Lotus Notes and get object handle passwords and ID 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 yet; ' if not, the error handler will kick in! Set Doc = db.CREATEDOCUMENT On Error GoTo 0 Doc.Form = "Memo" Doc.Importance = "1" '(WHERE 1=URGENT, 2= NORMAL, 3=FYI) 'Send an EMail to Doc.SENDTO = (strWHERE) 'SENDS A RETURN RECIEPT 'doc.RETURNRECIEPT = "1" Doc.Subject = strSUBJECT ' this will build the text part of your mail message Set rtItem = Doc.CREATERICHTEXTITEM("Body") Call rtItem.APPENDTEXT(strMSG) Call rtItem.ADDNEWLINE(1) 'Attach a document! 'Call rtItem.embedobject(1454, "", Attachment) '' set all object handles to nothing to release memory Call Doc.send(False) 'Make sure this parameter stays false Set Doc = Nothing Set db = Nothing Set s = Nothing Set rtItem = Nothing MsgBox "Mail has been sent!", vbInformation Exit Sub ErrorLogon: If Err.Number = 7063 Then MsgBox "Please login to Lotus Notes first!", vbCritical Set Doc = Nothing Set s = Nothing Set rtItem = Nothing Exit Sub Else strError = "An Error has occurred on your system:" & vbCrLf strError = strError & "Err. Number: " & Err.Number & vbCrLf strError = strError & "Description: " & Err.Description MsgBox strError, vbCritical Set Doc = Nothing Set s = Nothing Set rtItem = Nothing Exit Sub End If End Sub
I have bolded an instruction above, is this the way to include an attachment?
-
WSpatt
AskWoody LoungerJuly 10, 2004 at 9:39 pm #848673Can someone tell me how to send an attachment with the code that is used to send an email in this database. The following code comes from that database.
Private Sub cmdSEND_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 Dim Item As String Dim strWHERE As Variant Dim strEMAIL As String Dim strSUBJECT As String Dim strMSG As String If Me.lstEMAIL.ItemsSelected.Count = 0 Then MsgBox "You must select at least destination" Exit Sub End If strWHERE = strWHERE & lstEMAIL.Column(0, Item) strSUBJECT = strSUBJECT & lstEMAIL.Column(1, Item) strMSG = strMSG & lstEMAIL.Column(2, Item) ' start up Lotus Notes and get object handle passwords and ID 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 yet; ' if not, the error handler will kick in! Set Doc = db.CREATEDOCUMENT On Error GoTo 0 Doc.Form = "Memo" Doc.Importance = "1" '(WHERE 1=URGENT, 2= NORMAL, 3=FYI) 'Send an EMail to Doc.SENDTO = (strWHERE) 'SENDS A RETURN RECIEPT 'doc.RETURNRECIEPT = "1" Doc.Subject = strSUBJECT ' this will build the text part of your mail message Set rtItem = Doc.CREATERICHTEXTITEM("Body") Call rtItem.APPENDTEXT(strMSG) Call rtItem.ADDNEWLINE(1) 'Attach a document! 'Call rtItem.embedobject(1454, "", Attachment) '' set all object handles to nothing to release memory Call Doc.send(False) 'Make sure this parameter stays false Set Doc = Nothing Set db = Nothing Set s = Nothing Set rtItem = Nothing MsgBox "Mail has been sent!", vbInformation Exit Sub ErrorLogon: If Err.Number = 7063 Then MsgBox "Please login to Lotus Notes first!", vbCritical Set Doc = Nothing Set s = Nothing Set rtItem = Nothing Exit Sub Else strError = "An Error has occurred on your system:" & vbCrLf strError = strError & "Err. Number: " & Err.Number & vbCrLf strError = strError & "Description: " & Err.Description MsgBox strError, vbCritical Set Doc = Nothing Set s = Nothing Set rtItem = Nothing Exit Sub End If End Sub
I have bolded an instruction above, is this the way to include an attachment?
-
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSready4data
AskWoody LoungerJuly 16, 2004 at 10:16 am #852051Pat here is the code to send an attachment.
Function SendLotus(Attachment) ‘sends an email with an attachment
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‘ start up 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 yet;
‘ if not, the error handler will kick in!
Set doc = db.CREATEDOCUMENT
On Error GoTo 0doc.Form = “Memo”
doc.Importance = “1” ‘(WHERE 1=URGENT, 2= NORMAL, 3=FYI)‘Send an EMail to
doc.SENDTO = (“email@address.com”) ‘the address you want to send to
‘SENDS A RETURN RECIEPT
‘doc.RETURNRECIEPT = “1”
doc.Subject = “Type your subject line here”‘ this will build the text part of your mail message
Set rtItem = doc.CREATERICHTEXTITEM(“Body”)
Call rtItem.APPENDTEXT(“Type the body of your email here”)
Call rtItem.ADDNEWLINE(1)‘Attach a document!
Call rtItem.EMBEDOBJECT(1454, “”, Attachment)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
Set rtItem = NothingMsgBox “Mail has been sent!”, vbInformation
Exit Function
ErrorLogon:
If Err.NUMBER = 7063 Then
MsgBox “Please login to Lotus Notes first!”, vbCritical
Set doc = Nothing
Set db = Nothing
Set S = Nothing
Set rtItem = NothingExit Function
Else
strError = “An Error has occurred on your system:” & vbCrLf
strError = strError & “Err. Number: ” & Err.NUMBER & vbCrLf
strError = strError & “Description: ” & Err.Description
MsgBox strError, vbCritical
Set doc = Nothing
Set db = Nothing
Set S = Nothing
Set rtItem = NothingExit Function
End IfEnd Function
-
WSpatt
AskWoody Lounger -
WSready4data
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSready4data
AskWoody LoungerJuly 16, 2004 at 10:16 am #852052Pat here is the code to send an attachment.
Function SendLotus(Attachment) ‘sends an email with an attachment
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‘ start up 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 yet;
‘ if not, the error handler will kick in!
Set doc = db.CREATEDOCUMENT
On Error GoTo 0doc.Form = “Memo”
doc.Importance = “1” ‘(WHERE 1=URGENT, 2= NORMAL, 3=FYI)‘Send an EMail to
doc.SENDTO = (“email@address.com”) ‘the address you want to send to
‘SENDS A RETURN RECIEPT
‘doc.RETURNRECIEPT = “1”
doc.Subject = “Type your subject line here”‘ this will build the text part of your mail message
Set rtItem = doc.CREATERICHTEXTITEM(“Body”)
Call rtItem.APPENDTEXT(“Type the body of your email here”)
Call rtItem.ADDNEWLINE(1)‘Attach a document!
Call rtItem.EMBEDOBJECT(1454, “”, Attachment)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
Set rtItem = NothingMsgBox “Mail has been sent!”, vbInformation
Exit Function
ErrorLogon:
If Err.NUMBER = 7063 Then
MsgBox “Please login to Lotus Notes first!”, vbCritical
Set doc = Nothing
Set db = Nothing
Set S = Nothing
Set rtItem = NothingExit Function
Else
strError = “An Error has occurred on your system:” & vbCrLf
strError = strError & “Err. Number: ” & Err.NUMBER & vbCrLf
strError = strError & “Description: ” & Err.Description
MsgBox strError, vbCritical
Set doc = Nothing
Set db = Nothing
Set S = Nothing
Set rtItem = NothingExit Function
End IfEnd Function
-
WSMarkD
AskWoody LoungerJuly 16, 2004 at 10:48 pm #852417If you plan to do a lot of work automating Lotus Notes from Access/VBA, recommend take a look at this previous thread:
Re: Mail via Lotus Notes (Access 2000/xp)
This post has link to the IBM Lotus Notes site:
Lotus Documentation – Domino and Notes Toolkit for COM Guide
If you check this site, you’ll find a link to download the Notes Toolkit for COM Guide in compiled HTML (.CHM) help file format. In simple terms, “COM” (as in “COM Automation”) means that Lotus Notes can be automated using a COM-aware programming language such as VB/VBA. The guide provides code examples in both VB and VB Script, a description of the Domino/Notes object model, and much more useful information. If you intend to work further with Lotus Notes in VBA, recommend download this guide – don’t think your VBA “Help” files cover this stuff….
HTH
-
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSMarkD
AskWoody LoungerJuly 16, 2004 at 10:48 pm #852418If you plan to do a lot of work automating Lotus Notes from Access/VBA, recommend take a look at this previous thread:
Re: Mail via Lotus Notes (Access 2000/xp)
This post has link to the IBM Lotus Notes site:
Lotus Documentation – Domino and Notes Toolkit for COM Guide
If you check this site, you’ll find a link to download the Notes Toolkit for COM Guide in compiled HTML (.CHM) help file format. In simple terms, “COM” (as in “COM Automation”) means that Lotus Notes can be automated using a COM-aware programming language such as VB/VBA. The guide provides code examples in both VB and VB Script, a description of the Domino/Notes object model, and much more useful information. If you intend to work further with Lotus Notes in VBA, recommend download this guide – don’t think your VBA “Help” files cover this stuff….
HTH
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
*Some settings are managed by your organization
by
rlowe44
21 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 hours, 35 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
12 hours ago -
AI slop
by
Susan Bradley
11 hours, 11 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
13 hours, 17 minutes ago -
Two blank icons
by
CR2
19 hours, 47 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
22 hours, 11 minutes ago -
End of 10
by
Alex5723
1 day ago -
End Of 10 : Move to Linux
by
Alex5723
1 day, 1 hour ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
21 hours, 49 minutes ago -
test post
by
gtd12345
1 day, 6 hours ago -
Privacy and the Real ID
by
Susan Bradley
21 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
13 hours, 6 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 11 hours ago -
Upgrading from Win 10
by
WSjcgc50
12 hours, 35 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
2 hours, 29 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 days, 2 hours ago -
The story of Windows Longhorn
by
Cybertooth
1 day, 14 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days, 4 hours ago -
Are manuals extinct?
by
Susan Bradley
16 hours, 19 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
2 days, 13 hours ago -
Network Issue
by
Casey H
2 days, 1 hour ago -
Fedora Linux is now an official WSL distro
by
Alex5723
3 days, 1 hour ago -
May 2025 Office non-Security updates
by
PKCano
3 days, 2 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
3 days, 4 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days, 5 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 6 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 6 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.