| View previous topic :: View next topic |
| Author |
Message |
makz Newbie

Joined: 06 Mar 2007 Posts: 3
|
Posted: Tue Mar 06, 2007 3:09 am Post subject: Access document properties |
|
|
Hi folks
I want to access the document properties of .ods files via ooo basic.
| Code: |
oWorkbook = StarDesktop.loadComponentFromURL( ConvertToUrl( strDir & strFile ), "_blank", 0, Array() )
'The follwoing properties are clear
oWorkbook.DocumentInfo.getPropertyValue("Title")
oWorkbook.DocumentInfo.getPropertyValue("Subject")
oWorkbook.DocumentInfo.getPropertyValue("Keywords")
oWorkbook.DocumentInfo.getPropertyValue("Comments")
'these are not?
oWorkbook.DocumentInfo.getPropertyValue("Creation Date")
oWorkbook.DocumentInfo.getPropertyValue("Modify Date")
|
I cannot acces the dates, are the names of these properties ok?
Where can i find a list of all known properties?
Thank you for helping me  |
|
| Back to top |
|
 |
Mark B Super User


Joined: 16 Feb 2007 Posts: 852 Location: Lincolnshire, UK
|
Posted: Tue Mar 06, 2007 3:24 am Post subject: |
|
|
Hi
You'll need to use:
| Code: |
oCreated = oWorkbook.DocumentInfo.CreationDate
|
You'll then have access to:
- oCreated.Year
- oCreated.Month
- oCreated.Hours
- oCreated.Minutes
You can then do the same for oWorkbook.DocumentInfo.ModifyDate.
Mark _________________ Mark B's Articles |
|
| Back to top |
|
 |
makz Newbie

Joined: 06 Mar 2007 Posts: 3
|
Posted: Tue Mar 06, 2007 3:38 am Post subject: |
|
|
Oh, great!
Thank you  |
|
| Back to top |
|
 |
|