Sorry guys not to include the scriptlet at the beginning, I had it not available this morning. See below in bold where the script crashes.
 Code:
; ------------------------------------------------------------------------------------
; 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)
;=========================================================================================



I've also found the documentation for GetItemValue, the method returns an array with (I suppose) one element of string, but I'm unable to grab it...

Thanks again for your help and support!!!


GetItemValue method
Example

Given the name of an item, returns the value of that item in a document.

Defined in

NotesDocument

Syntax

valueArray = notesDocument.GetItemValue( itemName$ )

Parameters

itemName$


String. The name of an item.


Return value

value


The value or values contained in the specified name. The data type of the value depends on the data type of the item.
Notes item type Value return type
Rich text Array of strings. The text in the item, rendered into plain text
Text or text list (includes Names, Authors, and Readers item types) Array of strings
Number or number list Array of doubles
Date-time or range of date-time values Array of variants of type Date
When GetItemValue returns an array, each element in the array corresponds to a value in the item. If the item contains a single value, the array has just one element.








Edited by Mart (2012-04-26 09:59 PM)
Edit Reason: Please use code tags when posting code.