Robert Vojta wrote: > On 10/12/07, ashok _ <[EMAIL PROTECTED]> wrote: > > Hallo, > >> 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.
You have to add the property before you can assign it a value: > ThisComponent.DocumentInfo.AddProperty("aCustomProperty", > com.sun.star.beans.PropertyAttribute_REMOVABLE, "defaultval") > ThisComponent.DocumentInfo.SetPropertyValue("aCustomProperty", "a Custom > Value") It's important to use the "REMOVABLE" attribute so that it is immediately discernible that this property is not a "built-in" one. 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]