Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just to give you an idea of where to start here is some code to move text:

Sub ShowText()
    Dim oForm As Object
    Dim oField As Object
    oForm = ThisComponent.Drawpage.Forms.getByName("Your_Form")            'Get Form'
    oSubForm = oForm.getByName("Your_Sub_Form")                        'Get SubForm'
    Doc = ThisComponent
    DocCtl = Doc.getCurrentController()
    oGetField = oSubForm.getByName("Text2")
    oPutField = oForm.getByName("Text1")
    answer = oGetField.Text                                         'Get wanted text'
'Get the VIEW of the control'
    CtlView = DocCtl.GetControl(oPutField)
    CtlView.Text = answer                                            'Insert text'
    oPutField.commit()                         'need if going to update record'
End Sub