Hi Robert,
Robert Vojta wrote (14-10-2007 23:28)
On 10/12/07, ashok _ <[EMAIL PROTECTED]> wrote:
to set a custom property :
ThisComponent.DocumentInfo.SetPropertyValue("aCustomProperty", "a Custom Value")
This doesn't work in 2.2.1 version (I forgot to mention OpenOffice.org
version in my previous email). I tried this in StarBasic and in Java
before I sent my mail, but no success. Interesting thing is that no
exception is raised in Java.
The latter is indeed nasty.
SetPropertyValue only works if a property already exsists.
If not, you must use addProperty:
If Not oDocSetInfo.hasPropertyByName(sName) Then
oDocInfo.addProperty (sName, 0, sValue)
Else
ThisComponent.DocumentInfo.setPropertyValue( sName, sValue)
End If
Regards,
Cor
--
Cor Nouws
Arnhem - Netherlands
nl.OpenOffice.org - marketing contact
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]