Translations:Macros/Calc/ba001/7/en
Function get_doc(title)
docs = StarDesktop.getComponents() enumeration = docs.createEnumeration() Do While enumeration.hasMoreElements() doc = enumeration.nextElement() If doc.Title = title Then Exit Do End If Loop get_doc = doc
End Function </syntaxhighlight>