This is my code but the annotation appears empty... What i'm making wrong?
Code: Select all
Sub tp_insertarComentario(ByVal cad As String)
Dim document as object
Dim dispatcher as object
Dim oct1
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oct1 = ThisComponent.getCurrentController()
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Text"
args2(0).Value = "Text of the annotation"
args2(1).Name = "Author"
args2(1).Value = "Test"
args2(2).Name = "Date"
args2(2).Value = ""
dispatcher.executeDispatch(document, ".uno:InsertAnnotation", "", 0, args2())
End Sub