 <p>I'm working with LibreOffice 4.2.0.4 and the following Code works for me:</p> <pre><code> Dim Dir as String GlobalScope.BasicLibraries.loadLibrary("Tools") Dir = Tools.Strings.DirectoryNameoutofPath(ThisComponent.url, "/") </code></pre> <p>The variable "dir" contains now the path of the current document.</p>