john d. herron wrote:
> Is there a way, in Basic, to retrieve the contents of DocumentInfo
> fields from Writer docs without fully opening the files?
Of course you have to open the file to read anything. :-)
But I assume that you meant "without loading the full file content".
For this you can use
docinfo = CreateUNOService("com.sun.star.document.StandaloneDocumentInfo")
docinfo.loadFromURL( sMyFileURL )
This will load only the metadata stream of the package file, either in
ODF or in OOo1.x format (old SO binary formats are supported also,
depending on the OOo version you have).
Now you can access all properties in the DocInfo as you could when you
had accessed in in the current document, e.g. docinfo.Author.
Ciao,
Mathias
--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]