Translations:Macros/Calc/ba001/7/en

    From The Document Foundation Wiki

    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>