Hi,


How to insert the Comments as the description of document by OpenOfice.org
API?

what my code is like below . but it only can insert the "DocumentTitle" to
documents, but can't insert the "Comment" and “Author” , I don't know why.



// get storable interface

XStorable xStorable = (XStorable)xDoc;



// set properties

unoidl.com.sun.star.beans.PropertyValue[] propValsStore = new
unoidl.com.sun.star.beans.PropertyValue[4];

propValsStore[0] = new unoidl.com.sun.star.beans.PropertyValue();

propValsStore[0].Name = "Overwrite";

propValsStore[0].Value = new uno.Any(true);

propValsStore[1] = new unoidl.com.sun.star.beans.PropertyValue();

propValsStore[1].Name = "DocumentTitle";

propValsStore[1].Value = new uno.Any("MyDocumentTitle"

propValsStore[2] = new unoidl.com.sun.star.beans.PropertyValue();

propValsStore[2].Name = "Comment";

propValsStore[2].Value = new uno.Any("MyComment");

propValsStore[3] = new unoidl.com.sun.star.beans.PropertyValue();

propValsStore[3].Name = "Author";

propValsStore[3].Value = new uno.Any("MyAuthorName");





// save document

xStorable.storeToURL(strSaveToURL, propValsStore);



Best Regards!

★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
北京天達楽惠軟件有限公司
ソフトウエア部
謝暁繒



北京市海淀区中関村軟件園孵化器3B座1220
〒:100094
TEL: 86-10-82825235-602  FAX: 86-10-82826735
E-MAIL: xiexiao...@bjtenda.cn
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

Reply via email to