Bug in bookmark.ntf script library Edit Layouts, function locationIDFromINI

Hi there,there’s a bug in the bookmark.ntf script library “Edit Layouts”, “function locationIDFromINI”.

If you are using a different personal addressbook name than names.nsf (like in a multiperson setup with more than one notes.ini) the script terminates with an “Object variable not set”. The culprit are this lines:

rawLocationStr = session.getEnvironmentString( “Location”, True)

	locationInfo = STRExplode( rawLocationStr, ",", False)

	

	If Ubound( locationInfo) > 0 Then

		locationIDFromINI = locationInfo(1)

	End If

	

	Set Locnote = Locdb.GetDocumentByID(locationIDFromINI)

	locationIDFromINI = Locnote.UniversalID

Since the NAMES.NSF is hardcoded using a different addressbook…

A little fix for 6.0.2(?):

'Fix by STW:

	Dim strMyNAB As String

	'Get the NAB from the INI Variable

	strMyNAB = session.getEnvironmentString( "Names", True)

	If strMyNAB = "" Then

		'If it is empty we take the default name

		strMyNAB = "names.nsf"

	Elseif Instr(strMyNAB,",") > 0 Then

		'if there is a comma inside there is more than one nab and we take only the first one

		strMyNAB = Trim(Left(strMyNAB,Instr(strMyNAB,",")-1))

	End If

	

	Dim Locdb As New NotesDatabase("",strMyNAB)

Subject: Bug in bookmark.ntf script library Edit Layouts, function locationIDFromINI

I can confirm this bug. In my case the following line of code in the Editlayouts script library is causing the problem:

locationIDFromINI = Locknote.UniversalID

This causes an “Object Variable not set” error as Locknote is not being set.

Subject: re: Bug in bookmark.ntf script library Edit Layouts, function locationIDFromINI

thanks for the bug report Stephan and Kelvin. This is fixed in Release 6.04 / 6.51.

Rgds,

Debbie Branco

Notes Template Development