run lotus notes with parameters from other application

hi all,
I'll be very thankfull for helping me with this.

I'm writing a Java application, and I need by pressing a button in my application, to open or activate the lotus-notes, and automatically open a new mail with "to", "subject", "detailes" allready filled, so the user only have to send the e-mail.

I know how to run lotus-notes from java, but I do not know how to cause it to automatically run a macro that gets parameters from my application, and how this macro should look like.

hoping for help,
dov.
dovAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HemanthaKumarCommented:
In Java you can submit a background memo by setting the necessary parameters like SendTo, CopyTo, BlindCopyTo, Subject & Body fields. Then use the method Send in notesdocument to send the document. There is no need to open the mail and wait for the user to hit the send button.


Good Luck
Hemanth
0
dovAuthor Commented:
I must open the lotus-notes because the user has to fill in the body of the mail.
0
dovAuthor Commented:
Adjusted points to 85
0
dbbohlinCommented:
There are a couple of ways you might be able to perform this action.  I am afraid I don't know Java well enough to tell you if you can get to a compose document level from outside of Notes.  From within Notes you do database.createDocument() and push the values into the field before ending the routine and handing it back to the user.

If you can write to the Notes.ini file and can open a database from Java, I have a possible solution for you.  This is a little crude, but might help.

Create a script for the PostOpen action in the Database Script of the mail database you are using.  This script will look for an environmental flag indicating that a memo is to be created. The script then creates the memo and populates the desired fields from other environmental variables.

What your Java needs to do is write those environmental variables to the Notes.ini file and open the session and database for Notes.

The problem with this is that you invalidate the Notes Mail database, which if it is being updated from template on a regular basis or ever upgraded at all will delete all of the changes you had made.

Ok, that is one way.  Another possiblity and I don't know the limitations of Java and Notes to say if this is possible or not.  Is to use CORBA to instaciate your Notes and directly access the functions, forms and fields of the mail database.  I am in the middle of trying to learn this technology and from what I know this should be possible.  But the how, I cannot tell you.

Hope this helps or at least gives you a direction to follow.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.