Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendobject problem

Status
Not open for further replies.

njb

Programmer
Mar 17, 2000
38
0
0
US
I am working on a project to send email from my access database. Our email program is Lotus. The sendobject command is working correctly to open Lotus and build the email message and text. The user then clicks Send and has to minimize Lotus to return to Access. But what I want to do is send the message without having the user go into Lotus because I would like to send a tailored attachment to each person. I've tried specifying FALSE but it still brings up Lotus. Any ideas?

This is the code I am using (without attachment. One thing at a time!)

DoCmd.SendObject acSendNoObject, , , strTo, , , strSubject, strMessage, False
 
Can you tell me how Access is configured, I'm working with sendobject also receiving an error message.
thanks
 
Configured? I don't really understand your question. What kind of error are you getting?
 
I always get run-time error '2046'
"The action SendObject isn't available now."
I'm on 97- did you have to do anything special to get Lotus to even launch ?
 
I'm using MS Outlook and the sendobject works just fine. The issue is with Lotus "Keep Your Code Tight"
 
Reidnl,

NJB claims he/she is able to get sendobjects to work, NJB's issue is it's launching Notes, and that's what I want it to do. but I keep getting that error.
 
The only thing I did was make Lotus my default mail program. I am running Access 2000. It actually works pretty good but not perfect. Still trying to figure out a couple of "why does it do that?" but none of them are biggies. But what I really want to do is send email without Lotus being launched and I can't figure that one out. I did try and found nothing.

Thanks for any help you can give.
 
I had problems with the whole sendobject thing, I too received the "The action SendObject isn't available now." I checked all my references. Turns out the access installation was out of wack.(office 2000) I ran detect and repair....and presto!.

You might want to keep an eye on the arguments.
Docmd.sendobject acSendNoObject seems to work better it's suppose to be the default.

NOW!!!Working out the runtime errors when a user cancels the event or the send on the email. aaaarrrrrrggggggg
fl
 
I've spent the day working on this and am starting to make progress. I found a way to send email without launching Lotus. But Iam still trying to get the attachment correct.

I will post the solution when I get done. It's been a frustrating day but it is beginning to come together.
 
As promised, here is the solution I came up with for sending Lotus email via Access.

Dim NotesDB As Object
Dim NotesDoc As Object
Dim NotesRTF As Object
Dim NotesSession As Object

Set NotesSession = CreateObject("Notes.NotesSession")
Set NotesDB = NotesSession.GetDatabase("", "")

Call NotesDB.OpenMail

Set NotesDoc = NotesDB.createdocument
Call NotesDoc.replaceitemvalue("Sendto", strTo)
Call NotesDoc.replaceitemvalue("Subject", strSubject)

Set NotesRTF = NotesDoc.CreateRichTextItem("body")
Call NotesRTF.appendtext("Please click on the attachment box below. Select ""Launch"" if you are given the option.")
Call NotesRTF.addnewline(2)
Call NotesRTF.embedObject(1454, "", "c:\NameOfFile.rtf", "mail.rtf")

Call NotesDoc.Send(False)

Set NotesSession = Nothing

With this solution Lotus must be launched but it can be minimized. The email will be sent without Lotus maximizing and stopping at the email screen. I suspect I might have been able to start Lotus and fill in the signon info if I had pursued it but I stopped because what finally clicked in my dim head was that I was using portions of the Lotus client and the user does not have the client. Instead they are using the Lotus I-Notes internet version. Now there is a challenge. I was able to launch IE and point to the correct HTTP address to start I-Notes but I am clueless on how to proceed from there. So the user may have to purchase Lotus Client. We are looking at some other possibilities as well.

If you have access to a Domino and Lotus help database, there is an good write-up called "Accessing the Domino Objects through COM" under Lotusscript/com/ole classes. COM (component object model) is a required interface for Microsoft & Lotus to talk to each other.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top