[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Overcome Lotus ID Switching/Send Mail Using Specific ID/Identify Specific Office

Posted on 2002-04-02
4
Medium Priority
?
191 Views
Last Modified: 2008-01-16
I had write a work flow program using VB. When a new enquiry been raised,program will send a mail to action party involved.

Problem - When Visual Basic Application program is sending out mail, Lotus Notes when not started will be started automatically with the Login windows activated. My program can send the login password by using sendkey method. However if someone else had previously login with and account then when my program try to create a session it will result in error. As the current login account is no longer the same as the one I specify in my program. This result in an error.

If the Lotus is already running, how do I specify a specify ID account to used so that the mail send out will carry the ID name I designate.

Lastly how do I used VB to control the office Location.

Wrong office location also cause error to my program
0
Comment
Question by:jerahteo
[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
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 240 total points
ID: 6912739
You should read the Notes.ini file in c:\lotus\notes folder. If you read this file in line by line, and then make the appropriate changes to the following entries:

KeyFilename=User.id
MailServer=MAILSERVER
MailFile=mail\user.nsf

Before notes is launched it will then take these values when it is started.

Something like this:

Name c:\lotus\notes\notes.ini c:\lotus\notes\notes.old
Open "Notes.old" for input As #1
Open "Notes.ini" for output as #2
Do
  Line Input #1,strLine
  aryParts = Split(strLine,"=")
  If aryParts(0) = "KeyFilename" Then
    aryParts(1) = "MyNewUser.id"
  End If
  If aryParts(0) = "MailServer" Then
    aryParts(1) = "MyMailServer"
  End If
  If aryParts(0) = "MailFile" Then
    aryParts(1) = "mail\MyNewUser.nsf"
  End If
  strLine = Join(aryParts,"=")
  Print #2,strLine
Loop Until Eof(1)
Close #1
Close #2

Will create a new copy of notes.ini with the appropriate values.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6913465
Upgrading to notes 5.x could do your life easy.
;)
0
 

Author Comment

by:jerahteo
ID: 6914471
Thanks TimCotte but I have some question that I wish to clearify with you regarding your comment to me.

You mention that I should change the following :

KeyFilename=User.id
MailServer=MAILSERVER
MailFile=mail\user.nsf

But in a share Lotus Notes the account will always be changing. Beside changing the above what about
- CertificateExpChecked
- Location

I notice Location do following the ID switching it will always remain as what it had been set to till another user change the location again. How can I arrest this changes, will I be able to set to a default location.

As for CertificateExpChecked I saw this changes when I switch to my own ID :
CertificateExpChecked=C:\teoyh121.id 03-04-2002
I conclude that the CertificateExpChecked will also change along with the ID switch. Will your script mentioned take care of this.

Pardon me but I am not a expert in Lotus there I was wondering the script which you post is it mend to be inserted direct into Notes.ini or it has to be create somewhere else, please advice. Refering to script below.

Name c:\lotus\notes\notes.ini c:\lotus\notes\notes.old
Open "Notes.old" for input As #1
Open "Notes.ini" for output as #2
Do
 Line Input #1,strLine
 aryParts = Split(strLine,"=")
 If aryParts(0) = "KeyFilename" Then
   aryParts(1) = "MyNewUser.id"
 End If
 If aryParts(0) = "MailServer" Then
   aryParts(1) = "MyMailServer"
 End If
 If aryParts(0) = "MailFile" Then
   aryParts(1) = "mail\MyNewUser.nsf"
 End If
 strLine = Join(aryParts,"=")
 Print #2,strLine
Loop Until Eof(1)
Close #1
Close #2

0
 

Author Comment

by:jerahteo
ID: 6914702
Thanks TimCottee I have try out your comment and it did work changing the login ID to a default ID I want. I had also added the Location and Certificate part as well.

Sub SetDefaultID()

Open "C:\Lotus\Notes\Notes.old" For Input As #1
Open "C:\Lotus\Notes\Notes.ini" For Output As #2

Do While Not EOF(1)
 If EOF(1) = True Then Exit Sub
 Line Input #1, strLine
 
 aryParts = Split(strLine, "=")
 If aryParts(0) = "KeyFilename" Then
   aryParts(1) = "C:\tdept122.id"
 End If
 
 If aryParts(0) = "MailServer" Then
   aryParts(1) = "CN=STNMC002"
 End If
 
 If aryParts(0) = "MailFile" Then
   aryParts(1) = "\mailgp001\tdept122.nsf"
 End If
 
 If aryParts(0) = "CertificateExpChecked" Then
 aryParts(1) = "C:\tdept122.id " & Date
 End If
 
 If aryParts(0) = "Location" Then
 aryParts(1) = "Office (TSD),9A2,CN=TECH Service Dept/OU=TSD/OU=ST Marine/O=ST Group"
 End If
 
 strLine = Join(aryParts, "=")
 Print #2, strLine
Loop

Close #1
Close #2

End Sub

Initially I did not notice that the script you given me is a VB script however I came to realise it later.

But there is a problem with the script. When It loop to the eof it did not break out of the loop and it went into an error out of range. This is a small matter anyway.

The above will address the problem when the Lotus Notes is not running, but if its already login with another user account how then can I used VB to change the User ID so that the outgoing mail which I send from VB will contain my name or email address instead of another account name or email address.

Look forward to your comment.

Many thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 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