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

x
?
Solved

Create Lotus Notes email from VB - Can't set password

Posted on 2004-10-01
13
Medium Priority
?
938 Views
Last Modified: 2013-12-18
I have some VB code that sends an email.  It works fine if I am already logged into Lotus Notes.  I want the code to be able to work in batch and send the email when I am not signed on to Notes.  When I try and use the 'Initialize' method to set my password, I get an error 'Lotus Notes(88) - R438 "No such property or method".  Then Notes pops up a dialog  box asking for my password.

global IndSession As Object
set IndSession = nothing
set IndSession = CreateObject("Notes.NotesSession")
call IndSession.Initialize("mypasword")
Set db = IndSession.GetDatabase("LNMAIL2/SRV/xxxxxxxx", "mail\xxxxxx.nsf")
0
Comment
Question by:rdclk23
[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
13 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12199671
Did you install lotus notes on the machine ?

Try using CreateObject("Lotus.NotesSession")

~Hemanth
0
 

Author Comment

by:rdclk23
ID: 12199708
Yes, Notes is installed on the machine.  It works fine if I type my password in when prompted.  I want to suppress the password prompt.

I tried CreateObject("Lotus.NotesSession") and got an error 'Object Creation failed. Bad Object class.'  

I am using Lotus Notes 6.


0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12200316
The password should be your internet password.. not notes id password.

Also try using Call session.InitializeUsingNotesUserName("name", "password")

name is shortname listed in person doc of address book and password is the internet password
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:rdclk23
ID: 12200505
I'm still getting the 'no such property or method' error.  Maybe it's a timing thing and Notes is taking a few seconds to open.  Can you recommend some VB code like a delay loop that I can put before the Initialize call?
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12201469
session = CreateObject("Lotus.NotesSession")
           session.Initialize("arsenal13") - here arsenal13 is the password

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12202207
I don't think it is a timing issue. It is pretty straightforward.. and you can search in this forum on usage of initialize method
0
 
LVL 3

Expert Comment

by:xp_commander
ID: 12217093
As our guru qwaleete as already describerd earlier in this post :- http://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_21056925.html

" If you want to rearchitect the way you are doing the code, you COULD throw up a VB dialog with SendTo, etc. fields, prefilled, and allow the user to send the message from within your program, and you could then use the newer COM NotesSession class (Lotus.NotesSession or Domino.NotesSession) to send it without invoking Notes. "

You need to change your code to replace this :-
set IndSession = CreateObject("Notes.NotesSession")  
with
set IndSession = CreateObject("Lotus.NotesSession")    OR set IndSession = CreateObject("Domino.NotesSession")  

Also if you search within this forum , there is lots of discussion and working sample codes for your required code.

0
 

Author Comment

by:rdclk23
ID: 12217720
Thanks for you help folks, but this is going no where.  People are giving me suggestions without reading the thread.  I withdraw the question.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12218870
>> .  I withdraw the question.

If you withdraw that I may be able to help :)
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12229402
Hi rdclk23,
> Thanks for you help folks, but this is going no where.  People are giving me suggestions without
> reading the thread.  I withdraw the question.

No, I think you are not reading the answers.  Good luck, and, perhaps, good riddance.  Sorry, but that was called for.

Cheers!
0
 

Author Comment

by:rdclk23
ID: 12229499
Drop dead.   When people keep telling me to use CreateObject("Lotus.NotesSession")
 after I posted the error 'Object Creation failed. Bad Object class.' , I get annoyed.  When I say I want to suppress the password prompt and someone responds with a suggestion for more VB dialog boxes, I get annoyed.  As I stated in the beginning, the code I have WORKS if Notes if open as a client session.  I have since changed my solution to not use email so all of this is mute anyway.

0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12278519
Question answered by asker or dialog valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

721 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