Ask Your Question
0

How to Edit HelpText Property of a Control by Macro

asked 2020-04-14 00:37:35 +0200

Ardee gravatar image

My environment: Windows 10, LibreOffice Version: 6.4.2.2 (x64) HSQLDB Version 2.3.2 Split Database

I am busy developing a macro to iterate through a form and change any HelpText property content to another language (depending on user preference).

What code would allow me to edit the HelpText property of a Control to a new text? This is the only thing for which I seek help, the syntax to access the HelpText Control for edit.

This is the code I use to obtain the HelpText content of a given Control

Sub GetHelpText
    Dim oForm As Object
    Dim oField As Object
    Dim sGetValue As String
        oForm = ThisComponent.Drawpage.Forms.getByName("MainForm")
        oField = oForm.getByName("ButtonFileIt")
        sGetValue = oField.HelpText
        MsgBox(sGetValue)
End Sub

Thank you for any help

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-04-14 00:54:43 +0200

Ratslinger gravatar image

Hello,

   oField.HelpText = "Put your new text here"
edit flag offensive delete link more

Comments

@Rastlinger thank you. Boy was that easy, shame on me, Too many long hours, I'm confusing property with control type issues.

Ardee gravatar imageArdee ( 2020-04-14 01:21:35 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-04-14 00:37:35 +0200

Seen: 20 times

Last updated: Apr 14