' Returns the content of a dictionary as an array ' WARNING: performs a file open operation. make sure to have access to the dictionary (especially in validation) Public Function DictionaryToArray(dictionaryName As String) As String() Dim dict As CscDictionary Dim TextLine, TextLines As String Dim dictItems() As String Set dict = Project.Dictionaries.ItemByName(dictionaryName) Open dict.TextFilename For Input As #1 Do While Not EOF(1) ' Loop until end of file Line Input #1, TextLine ' Read line into variable TextLines = TextLines + TextLine + ";" Loop Close #1 ' remove trailing separator TextLines = Left(TextLines, Len(TextLines) - 1) dictItems = Split(TextLines, ";") DictionaryToArray = dictItems End Function