Wich type of "Comments" want you insert a document?
Is it analog with manually inserted comment into text "Edit -> Insert Comment"?
Or you tought "File -> Properties -> Description -> Comments" option?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
sub comment
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(9) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Properties.UseUserData"
args1(0).Value = true
args1(1).Name = "Properties.DeleteUserData"
args1(1).Value = false
args1(2).Name = "Properties.Title"
args1(2).Value = ""
args1(3).Name = "Properties.Subject"
args1(3).Value = ""
args1(4).Name = "Properties.KeyWords"
args1(4).Value = ""
args1(5).Name = "Properties.Description"
args1(5).Value = "It is named DESCRIPTION, not COMMENT"
args1(6).Name = "Properties.AutoReload"
args1(6).Value = false
args1(7).Name = "Properties.AutoReloadTime"
args1(7).Value = 0
args1(8).Name = "Properties.AutoReloadURL"
args1(8).Value = ""
args1(9).Name = "Properties.AutoReloadFrame"
args1(9).Value = ""
dispatcher.executeDispatch(document, ".uno:SetDocumentProperties", "", 0, args1())
end sub
args1(5).Name = "Properties.Description"
args1(5).Value = "It is named DESCRIPTION, not COMMENT"
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
propValsStore[2].Name = "Properties.Description";
propValsStore[2].Value = new uno.Any("MyComment");
Your previous syntax:
propValsStore[2].Name = "Comment";
propValsStore[2].Value = new uno.Any("MyComment");
Why not you still your previous syntax?
If another properties seems work with your syntax, then try it:
propValsStore[2].Name = "Description";
propValsStore[2].Value = new uno.Any("MyComment");
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Sorry, no more ideas.
The C # language I do not know.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Hi,
Your initial code is used for a comment in a document using versioning, see documentation of service MediaDescriptor.
For what you want to do, you have to get the DocumentProperties from the document.
Then you have to modify the attribute Description. Note : an attribute is not a property, it is related to an interface.
There is no setDocumentProperties(), it is magically modified.
REM ***** BASIC *****
Option Explicit
Sub fillDocumentDescription
Dim docInfos As Object
docInfos = ThisComponent.getDocumentProperties()
docInfos.Description = "This is a comment" & chr(13) & "inside File > Properties > Description"
' and that's all !
End Sub
hi,
I can't find the interface "XDocumentProperties" or "XDocumentPropertiesSupplier" in the api for c#.
But I had been solved this issue by edit the "meta.xml" file by AODL lib ,
and after all, thanks every one ,and I will still try to find the method to solve these problem by OOo api by c#.