?
Solved

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

Posted on 2002-04-02
4
Medium Priority
?
189 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

764 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