Teamstudio Script Browser

Teamstudio Script Browser is a tool to help you use and navigate the LotusScript code stored within an IBM Lotus Notes database in a way that has never before been possible.

Navigating the various places where LotusScript can be defined is tedious and even confusing to even the most-seasoned Domino programmer. There is currently no way to easily navigate all the different ways that script can be linked together.

Itâ??s common to have LotusScript code be defined in different places within a Notes database. Seeing all the code and moving around in Designer to edit that code is not a simple task. You canâ??t see what LotusScript functions are calling other LotusScript functions without performing a database-wide search. Teamstudio Script Browser solves all these problems.

And the best of all … It’s freeware !!

Trigger Happy

“Trigger Happy” (formerly known as agent boost ) by Damien Katz let’s you register LotusScript agents to be triggered by low level Domino events. C Source-Code included. You’ll find the project here.

How To Integrate Open Office And Lotus Notes To Generate PDF …

And OoO Documents Using Lotus Notes Data And COM Automation

Justin Freeman posted this tip in his blog. The article includes a working sample, too

“This database is an example of how to integrate Open Office (OoO) with Lotus Notes using COM automation. It exports information from an Invoice document in a Notes database into a OoO Writer document. The Writer document is then formatted sincely into a printable invoice, then both a completed PDF and OoO version is re-attached to the Invoice document in Notes – all within a few seconds!”

Installierte Office Version ermitteln

Carlos J Hernandez. fragte auf OpenNTF nach einer Möglichkeit, die installierte Office Version auf dem Rechner eines Users zu ermitteln

” I am a Helpdesk Manager with some 3400 Notes users. How can I pull the MS Offices version information when a users created a ticket?”

Die einfachste Möglichkeit ist die Verwendung von @RegQueryValue ( ab Version 5.0.2 ). Der Hintergrund ist folgender:
Jede Office Version trägt einen versionsabhängigen Schlüssel ( 8.0 / 9.0 / 10.0 ) in die Registry ein. Dies ist aber noch kein eindeutiges Kennzeichen, da bei einem Update der Officeversion der Vorgängerschlüssel nicht automatisch entfernt wird. Daher muÃ? man noch weiter in die Tiefe gehen. Mit der WinAPI könnte man das Vorhandensein eines bestimmten Schlüssels abfragen. Eindeutiges Merkmal für die installierte Office version ist der Schlüssel “InstallRoot”. Dieser Schlüssel ist nur in der installierten version vorhanden.
Mit @RegQueryValue lässt sich aber nicht das Vorhandensein eines Schlüssels abfragen, sondern nur der Wert eines Schlüssels auslesen. Daher begeben wir uns auf die unterste Ebene und ermitteln im Schlüssel “InstallRoot” den Wert des Eintrags “Path”. Nur die installierte Version liefert hier einen gültigen Wert.

@RegQueryValue("HKEY_LOCAL_MACHINE"; "Software\Microsoft\Office.0\Common\InstallRoot"; "Path")!="";"Office 97";
@RegQueryValue("HKEY_LOCAL_MACHINE"; "Software\Microsoft\Office.0\Common\InstallRoot"; "Path")!="";"Office 2000";
@RegQueryValue("HKEY_LOCAL_MACHINE"; "Software\Microsoft\Office.0\Common\InstallRoot"; "Path")!="";"Office XP";
"no Office installed");
@Prompt([Ok];" ";_retVal)


Most Frequently Used Technotes for Lotus Domino Server

When creating a new copy of a database with File -> Database -> New Copy, there is an option to only copy the design and no documents from the source database.
When creating a new replica of a database with File -> Replication -> New Replica, there is no option like this. The replica stub that is created will not include any documents, but it will not allow administrators to make any modifications to the database design or the ACL.

Is it possible to create a replica of a database (not a replica-stub) without any documents. –> more

@Unique Not Generating a Unique Number in Web Applications

The @Function, @Unique, is designed to generate a random, unique number as text data type. When used in a computed field on a form, for example, you should get a new, unique number for each new document created with such a form. You notice, however, when @Unique is used in a Web Application form, the number is not always unique. Why is this happening?

In the case where @Unique is contained in a computed field in a web application, the reason for the non-unique number could be related to the browser cache settings. If the “Check for newer versions of stored pages” option in the IE browser is set to “Automatically”, the number generated may duplicate.

To work around the issue, do one of the following:

Change the “Check for newer version of stored pages” option in IE (found under Tools –> Internet Options –> General tab –> Setting button) to “Every visit to the page” to ensure that a new and unique number is generated by the IE browser. In this case, the Domino server is sending a new and unique number, but the browser was caching the previous value instead of retrieving the newly generated one.
Use a profile document to generate a random number. Then, use a web query open or web query save agent to obtain a unique key by accessing a profile document for sequential unique numbers

Lotus Software KnowledgeBase Document# 1191209

Notes 6.5.x Documents that Have Been Replied to or Forwarded Appear as Unread

In Notes 6.5.x, when you reply to or forward a message, the message becomes unread directly afterward, even though you have already read the document.
This issue was reported to Lotus software Quality Engineering; however, it was been found that Notes was functioning as designed. To avoid the issue, enable the Database Property “Do not mark modified documents as unread” found on the Designer tab.

The property is enabled by default in the mail templates that ship with Notes/Domino 6.0.3 and 6.5.

A document that is forwarded or replied to in Notes 6.5.x appends a $RespondedTo field to the document and assigns it a value so that the corresponding “Action performed” icon appears in the view. With the addition of this field, the document has now been modified. Without the “Do not mark modified documents as unread” option enabled, Notes marks the document as Unread because the document was modified.

Lotus Software KnowledgeBase Document# XXXXXXX

Die Firewall von Windows XP Service Pack 2

Bereits in der Urfassung von Windows XP ist eine Firewall enthalten gewesen, von der aber kaum jemand Notiz genommen hat. Gründe hierfür waren der mangelnde Komfort und nur mäÃ?iger Funktionsumfang.

Mit dem Service Pack 2 hat Microsoft die Firewall aufgebohrt und mit neuen Features versehen. Die Einstellung der Firewall ist aber nicht ganz so trivial, wie es bei erster Betrachtung den Anschein hat. Der Artikel von WinTotal gibt eine Hilfestellung und Rat zur Einstellung und Anpassung der Firewall.

Using AWStats To Report On Domino Web Logs

Lotus Notes/Domino doesn’t have very good built-in web log reporting functionality. As a web server, Domino can send traffic information to text files or to a DomLog database, but there’s no real reporting built-in, so you’re stuck with reams of information and no good way to look at it. Julian Robichaux shows in his article how to use AWStats to report on Domino web logs

Should Debug_Outfile be used on a Domino 6.x server?

Starting with Domino 6.0, the Domino server creates a console.log file by default in the “IBM_TECHNICAL_SUPPORT” folder, which is located in the server’s Data directory. The development of the console.log file, which can be dynamically enabled and disabled at the server console, makes the use of the parameter debug_outfile obsolete.

For backwards compatibility, when debug_outfile is present in the notes.ini it takes precedence. However, using the debug_outfile parameter is no longer the preferred method for capturing console output.

Console.log is superior to the use of “debug_outfile” because it can be dynamically enabled and disabled at the server console thus eliminating delays capturing crucial data. Server reboots are no longer required to begin capturing basic console logging, which is not the case when using the parameter “debug_outfile”.

Enabling Dynamic Console Logging

Console.log can be dynamically enable and disabled at the server console with the following commands:

start consolelog

stop consolelog

Please note that these commands are not “sticky” (i.e. they are only specific to the current server session). To avoid console logging from being disabled after a reboot, the following parameter can be set to 1 (where 1 is enabled and 0 is disabled):


Lotus Software KnowledgeBase Document# 1181562

ReAttach – Attachment nach Bearbeitung wieder anhängen

Des Öfteren stehen die User vor dem Problem, ein Attachment bearbeiten zu müssen und an einen anderen User weiterleiten zu mssen.
Lotus Notes in den Versionen 4 und 5 bietet hier leider nur die Möglichkeit, den Anhang zu detachen, mit der entsprechenden Anwendung zu öffnen und nach der Modifikation wieder an das Dokument anzuhängen.

Die Lotus Script Klasse clsAttachment erledigt dies in einer einzigen Aktion. Die Einbindung ist kinderleicht. Legen sie das Arbeitsberzeichnis und das Feld fest, das die Anhänge enthält.

Sub Click(Source As Button)

  Dim workdir as String
  Dim rtField as String
  Dim A As New Attachment
  workdir = "c:\temp"
  rtField = "Body"

  Call A.Modify ( workdir , rtField )

End Sub

Bei mehreren Anhängen erfolgt die Auswahl des zu bearbeitenden Anhangs komfortabel durch ein PopUp Menue. Nach Auswahl des Anhangs wird dieser mit der entsprechenden Anwendung geöffnet. (getestet unter 4.6.x ( unter 4.5 nur mit Modifikationen lauffähig ), 5.x mit Windows 9x / NT4 SP 6a / 2000 und Office 97 / 2000 )


@Command([ToolsUserLogoff]) in Lotus Script

Mit Hilfe der Windows API kann der Befehl @Command([ToolsUserLogoff]) in Lotus Script simuliert werden.

VK_F5 = &H74

Declare Sub WIN32_KeyBoardEvent Lib "User32" Alias "keybd_event" ( Byval bVirtualKey As Integer , Byval bScanCode As Integer , dwFlags As Long , dwExtraInfo As Long )
Sub Logoff ( )
  Dim ModuleName As String
  ModuleName = {Logoff}
  On Error Goto ErrorHandler

  WIN32_KeyBoardEvent VK_F5 , 0 , KEYEVENTF_KEYDOWN , 0
  WIN32_KeyBoardEvent VK_F5 , 0 , KEYEVENTF_KEYUP , 0
  Exit Sub

  Select Case fnErrorHandler ( Error$ , Err , Erl , ModuleName )
    Case 0
      Exit Sub
    Case 1
      Resume Next
    Case Else
      Resume Next
  End Select
End Sub

Function fnErrorHandler ( strErrorText As String , lngErrorNumber As Long , lngErrorLine As Long , strModuleName As String ) As Integer
Print ( {ERROR: } + strErrorText + { (Nr.: } + Cstr (lngErrorNumber ) + {, Line: } + Cstr (lngErrorLine ) + {, Module: } + strModuleName + {)} )
fnErrorHandler = 1
End Function

Und zum Testen folgender Aufruf

Sub Click(Source As Button)
  Call Logoff
End Sub 

Enumerating Local And Network Drives

Is there a way that I can return all available local drive letters ? Yes, there is a way !

Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (Byval nBufferLength As Long, Byval lpBuffer As String) As Long
Function GetDrives() As String
  Dim tmp As String
  Dim iCount As Integer
  Dim strDrives As String

  strDrives = Space$(64)
  Call GetLogicalDriveStrings(Len(strDrives), strDrives)
       For iCount = 1 To Len(strDrives) Step 4
           tmp = tmp & " " + Mid$(strDrives, iCount, 1)
      Next iCount

     GetDrives = Trim(tmp)
End Function
Sub Click(Source As Button)
    Msgbox getdrives
End Sub

Using GetDocumentByKey with Numerical Values Returns Incorrect Document or No Document

When you use the LotusScript GetDocumentByKey method (of the NotesView class) with a numeric value for the key, either no documents are returned or the incorrect document is returned.You must convert both the column formula and key to string values in order to perform the lookup. You should edit the column formula, adding an @Text function call to the present formula. The key values passed to the GetDocumentByKey method can be converted to string values by using the Cstr function. The dimension, or Dim, statement for the key array must now be declared as a String or Variant.


Using the @Text function in a column formula. Given a formula which contained the entry ‘numfield’:


Using the Cstr function to convert the desired key value:

keys(0)= cstr(doc.numfield(0))

Lotus Software KnowledgeBase Document# 1101037

DatabaseProperties Class

The DatabaseProperties class has been created to manage Notes databases in small to enterprise-wide domains using LotusScript and C API to set most Database settings on R5/R6 databases that you can set via client notes but pou don’t manage via LotusScript directly.

Its code has been built/expanded from the various Lotus Script/C API contributions over the years in the forums by many authors such as Normunds Kalnberzins and Rod Whitely as well as the dbdesign stuff by Damien Katz (and expanded dbdesign by Josh Jore).

This class is an extension of the “dbdesign” and a reorganization of the function that you can get in “R5 Database Manager” and my improvment. For the DBDesign a i made a fix in the method that update the document thant contain Template Name/Design Name/Category. Now the string store in the notes document does not contain a garbage Characters.