-
Aug 9th, 2000, 07:12 PM
#1
Thread Starter
Junior Member
Can anyone please tell me how to send Email of Lotus Notes 4.5 using Visual Basic.Lotus Notes provides an Automation class for this purpose.But I am unable to create an Object of that class.
Please Help me.
-
Aug 9th, 2000, 07:17 PM
#2
Addicted Member
Are you asking how to send an e-mail from VBScript, or how to send the Lotus Notes Program to someone with VBScript, or how to use Lotus Notes Program to send someone an e-mail?
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Aug 9th, 2000, 07:33 PM
#3
Thread Starter
Junior Member
Lotus Notes Email
I am Having VB6 and Lotus Notes Notes installed in My PC. I can directly send Email using Lotus Notes.But I want to send Email through VB6 codes using Lotus Notes Automation Classes.
Lotus Notes Provides notes32.tlb file for this purpose.It has many classes inside ,properties and methods
which can be used.But to access all this I need to create an Object of that Class.But I am getting an error like Activex Component cant't Create Object. and program stops executing at this line
Set s = CreateObject("lotus.NOTESSESSION")
Please helpme.
An Example of the code which I have used for getting the number of documents created before 1/1/99.
Sub Macro1()
Dim s As lotus.NOTESSESSION
Dim db As NOTESDATABASE
Dim vw As NOTESVIEW
Dim doc As NOTESDOCUMENT
Dim createtime As Date
Dim doccount As Integer
Set s = CreateObject("lotus.NOTESSESSION")
Set db = s.CURRENTDATABASE
Set vw = db.GETVIEW("Myview")
Set doc = vw.GETFIRSTDOCUMENT
Do Until doc Is Nothing
createtime = doc.CREATED
If (createtime > #1/1/99#) Then
doccount = docount + 1
End If
Set doc = vw.GETNEXTDOCUMENT(doc)
Loop
MsgBox (CStr(doccount) + "documents were created before 1/1/99.")
End Sub
-
Aug 9th, 2000, 07:38 PM
#4
Addicted Member
Aah, well, I can't help you there but I can give you a short little function which will let you send e-mail from your address if you want:
Function MailThis(strSubject, strBody)
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = sender name
Mailer.FromAddress= sender address
Mailer.RemoteHost = "Mail sever"
Mailer.AddRecipient "To's Name","To's Address"
Mailer.AddCC "CC's Name","CC's Address"
Mailer.Subject = strSubject
Mailer.BodyText = strBody
End Function
I hope that helps!
Stephen Haney- 115 116 101 118 101 31 72 65 78 69 89
-ShardsOfSilence.net- ^ My name in ASCII ^
You forget something new every day
| WinME | VB6 Pro | MSC++ | Lambda MOO |
-
Sep 1st, 2000, 11:35 PM
#5
New Member
Your Missing Some vital code
Before you can use Lotus Notes back end classes you must do a NotesSession.Initialize to start the connection between VB and Lotus Notes.
Darryl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|