Well I just learned something tonight. The IDEAScript for a key value extraction uses an array to hold all the values to extract. When I was creating the script I assumed that the array was one of string since it was holding text but when I did that the script kept giving me an error when I got to that line. Turns out that when you define the array you either don't tell IDEA what it is or define it as a Variant so it needs to be one of these:
Dim myArray(0,0) or Dim myArray(0,0) as Varient - if you define it as string it will give you an error. The code per the language browser is correct, they just don't give any explanation for what type the array is.
' Open the database
Set db = Client.OpenDatabase("Sample-Customers.IMD")
' Create the task.
Set task = db.KeyValueExtraction
' Define an array to specify the country names.
myArray(0,0) = "ARGENTINA"
myArray(1,0) = "SOUTH AFRICA"
' Configure the task.
task.AddKey "COUNTRY", "A"
task.DBPrefix = "KeyVal"
task.CreateMultipleDatabases = True
' Perform the task and output the resulting database name.
dbName = task.DBName
' Clear the memory.
Set task = Nothing
Set db = Nothing
' Open the result.