Hi! I hope someone can help me. I want to change the content of a form with a macro.
I have a form “Display”. Its ‘Form Properties-Data-Content’ box defines the content of the form to be a table “Table 1”. I am attempting to write a macro that will change this content from “Table1” to “Table2”.
I found on this site a solution to a similar enquiry ‘Change the base form sort property by macro’ and have experimented along the lines suggest there. But many attempts based around the lines shown below have failed.
oForm = ThisComponent.Drawpage.Forms.getByName(“Display”)
oForm.Content = “(”“Table2"”)"
oForm.reload()
The objection is “Property or method not found:Content”.
I have looked into the literature but can find no example where someone is changing the content of a form and am puzzled because if ‘Filter’ worked in the previous enquiry what should I use other than ‘Content’ here?
Can anyone give me a clue how to proceed?