Many thanks for the feedback!

tried

$homeserver[0].value
and
$homeserver[0].text

and both get kix to crash :-(

I think GetFirstItem("Itemname") doesn't work either, because I have not a notes document returned, but an array. So I focus on the ADODB stuff..

 Code:
Function LookupShortname($Shortname)
  Dim $db ; As NotesDatabase
  Dim $mynotesdir ;As NotesDirectory
     
  $mynotesdir = $oNotesSession.getDirectory("Servername")
     
  Dim $homeserver ; As Variant
  Dim $Type
  Dim $Mail
  Dim $stream_object
  Dim $RC
  Dim $String
  
  $homeserver = $mynotesdir.GetMailInfo($Shortname, True)
  $stream_object = CreateObject("ADODB.Stream")
  $RC = $stream_object.open
  $stream_object.type = 1 ; Set input data to binary I hope...
  $RC = $stream_object.write($homeserver)
=> here I get COM exception error "write" (ADODB.Stream - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.) [-2147352567/80020009]
  $stream_object.position = 0
  $stream_object.charset = "iso-8859-1"
  $stream_object.type = 2
  $stream_object.position = 0
  $string = $stream_object.read
  ? $string
EndFunction


Hmm, think this exercise gets to hard for me....






Edited by Sam_B (2012-11-23 04:27 PM)