I've again having an issue with COM scripting and Lotus Notes. I need to lookup user details of a known Notes user. I found the method GetMailInfo

Here's my code I borrowed from IBM's example and translated to KIX:

 Code:
Break on
$Ret = SetOption("Explicit", "on")
; ---------------------------------------------------------------------------------------------------------------------
; Search Lotus Notes directory 
; ---------------------------------------------------------------------------------------------------------------------
Function LookupShortname($Shortname)
    Dim $db ; As NotesDatabase
    Dim $mynotesdir ;As NotesDirectory
   
    $mynotesdir  = $oNotesSession.getDirectory("<IP of my Notes Server>")
   
    Dim $homeserver ; As Variant
    Dim $Type
    Dim $Mail   
    $homeserver =  $mynotesdir.GetMailInfo($Shortname, True)
    ? "error returned : " @error @serror
    => I get 0 / success
    $Type = VarType($homeserver)
    => I get 8200 (Array of string)
    ? "Mail Server: " + Cstr($homeserver[0])
    => ERROR : Error in expression: this type of array not supported in expressions.!
Script: I:\Scripting\LnConfigRepair\V 0.75\Addressbook.kix
Line  : 18
    ? "Build Number: " + Cstr($homeserver[1])
    ? "Domino Version: " + Cstr($homeserver[2])
    ? "Mailfile: " 	+ Cstr($homeserver[3])
    ? "Short Name: " + Cstr(homeserver[4])
    ? "MailDomain: " + Cstr(homeserver[5])
    ? "Username: " + Cstr(homeserver[6])
    ? "internetMailAddress: " + Cstr[homeserver(7])
    ? "Out of Office: " + Cstr(homeserver[8])
EndFunction
Global $oNotesSession
Dim $Ret
Dim $Shortname
$Shortname = "sblaettl"
;
$oNotesSession = CreateObject("Notes.NotesSession")
$Ret = LookupShortname($Shortname)


Any hint how I must handle this array of string? Many thanks!


Edited by Sam_B (2012-11-21 08:21 PM)