; ------------------------------------------------------------------------------------
; Change Mail File Location from "on Server" to "on local" for all location documents
; ------------------------------------------------------------------------------------
Function SetMailFileLocationToLocal($oNotesSession)
  Dim $oBook            ; Adress book object
  Dim $ret              ; Return value of function call
  Dim $LocationView     ; Location view
  Dim $LocationDocument ; Location document
  Dim $valueArray
  ;
  $SetMailFileLocationToLocal = 0
  ; -------------------------------------------------------------------------------------
  ; For The Current User in The Current Session, Get All The NABs
  ; -------------------------------------------------------------------------------------
  For Each $oBook in $oNotesSession.addressbooks
    ; -----------------------------------------------------------------------------------
    ; Check If The Current NAB is Private or Public
    ; If The NAB Is Private, Than It Should Be Your Personal NAB
    ; -----------------------------------------------------------------------------
    ? "Name of adressbook: " $oBook.filename
    If $oBook.isprivateaddressbook 
      ; ---------------------------------------------------------------------------------
      ; Verify if The NAB is Open, If Not, Open it
      ; ---------------------------------------------------------------------------------
      If Not ($oBook.isopen)
        $ret = $oBook.open("", $oBook.filename) ;Now Get All The Docs in The Location View
      EndIf
      $LocationView = $obook.getview("Locations")
      $LocationDocument = $LocationView.getfirstdocument 
      While @ERROR = 0
        $valueArray = $LocationDocument.GetItemValue("MailType")
        ? "Mailtype: " $ValueArray[0]
here I get
[b]ERROR : Error in expression: this type of array not supported in expressions.!
Script: I:\Scripting\SDSDeploy\CH\CH_SetupClient\Work\test3.KIX
Line  : 62[/b]
        $LocationDocument = $LocationView.getnextdocument($LocationDocument)
      Loop
    EndIf
  Next
EndFunction
; ----------------------------------------------------------------------------------------
; Start Notes Session
; ----------------------------------------------------------------------------------------
Function StartNotesSession()
  ;Die Session starten
  $StartNotesSession = CreateObject("Notes.NotesSession")
  If @ERROR <> 0
    $ret = MessageBox("Error starting Notes, unable to continue", "Problem with Notes configuration", 48)
    Exit 1
  EndIf
EndFunction
; =======================================================================================
; M A I N
; =======================================================================================
$PreviousState = SetOption("Explicit", "on")
Break on
Dim $Ret
Dim $MailServer
Dim $MailFileName
Dim $CSCDircatFileName
Dim $oNotesSession
Global $GloIniFile               ; INI file that controlls the parameters
;
$GloIniFile         = @SCRIPTDIR + "\NotesSetup.ini"
$Mailserver         = "<Name of Mailserver goes here>"
$MailFileName       = "<Path to mailfile goes here>"
; --------------------------------------------------------------------------------------
; read name of Notes directory to replicate
; ------------------------------------------------------------------------------------
$CSCDirCatFileName = ReadProfileString($GloIniFile, "Setup", "NotesDirectory")
If @ERROR <> 0
  $ret = MessageBox("Error reading value for NotesDirectory from " + $GloIniFile + ", unable to continue", "Problem with Notes configuration", 48)
  Exit
EndIf
; --------------------------------------------------------------------------------------
; Try to start Lotus Notes
; --------------------------------------------------------------------------
$oNotesSession = StartNotesSession()
$ret = SetMailFileLocationToLocal($oNotesSession)
;=========================================================================================