If you have some long text with line feed characters you could try pasting it into Notepad as an intermediary and then from there into Writer. That may convert the line feeds to paragraph marks and let you do it in one go instead of in chunks.
I just use Basic so don't know anything about creating a controller. My code to create a blank clickable status bar item in Basic is here. https://forum.openoffice.org/en/forum/viewtopic.php?t=110487 It is indeed a bit like a nasty hack, but attached is a rudimentary extension for adding a dialog to...
My understanding is: Its not possible to write a statusbar controller in Basic and you'd need to use a different language. You can replace the status bar with a progress bar and some text, but then you lose the status bar features You can create a clickable blank item on the status bar in Basic. And...
Documents you post should have sensitive information removed. Column c only has green or no color in it. By a separate sheet you seem to mean a sheet in a different document? Perhaps you could make a simple version (with sensitive information removed) of part of the original and the matching result ...
Have you tried the macro recorder - sounds like it might be able to do what you're asking, or some of it? How did you do them the first time as you talk about rewriting?
Thanks Lupp. Yeah, page styles are a paragraph property - not very intuitive. My code assumes that the applied page style's next page style will be the desired one - otherwise you'll also need to set the following page's first paragraph's page style to override the style's next page style setting.
This creates a new page style and then sets the viewcursor pagestyle to it in Basic with thiscomponent.stylefamilies.getbyname("PageStyles") ps = thiscomponent.CreateInstance("com.sun.star.style.PageStyle") .insertbyname "MyNewStyleName",ps end with thiscomponent.curren...
Your VB5 code runs for me within LO with an error on the line 'Set tSortField = oServiceManager.Bridge_GetStruct("com.sun.star.table.TableSortField") Looking at MRI the servicemanager doesn't have that property or method runs within LO by changing to Set tSortField = new "com.sun.star...
You're perhaps not getting other repliers because people here aren't using Autoit and can't explore your problem. As an alternative, if you can use get / setDataArray then presumably Autoit can call its own sort array function? r =thiscomponent.sheets(0).getcellrangebyname("A1:A5") dataarr...
The problem is, if a document is reopened then the textsections will be in document order, but when any textsections are added they get appended to the api list, not added in document order. Or if sections are moved their position is not changed in the API list either. And sections can't be found us...
This is to order in both dimensions but that diverges from the list in the navigator in OO which doesn't do so. (again very limited testing)* REM ***** BASIC ***** Option Explicit Sub GetTextSectionInDocOrderIncHorizontal dim cont,vc,ts, i as long,y as long,ub as long,j as long,k as long, x as long,...
Thanks for the idea, I've applied your cunning method to textsections. Its much simpler than enumerating all the paragraphs. https://forum.openoffice.org/en/forum/viewtopic.php?t=111347 As I say there, In the past I have had issues with Writer not always updating the viewcursor position properly whe...
Get a list of Writer textsections in the order of where they are in the document * (as they appear in the Navigator, not what is retrieved by the api textsections list which isn't in document order) Uses Lupp's method of getting the position from the viewcursor (as applied to annotation anchors here...
If fhere are versions where the viewcursor returns null for the textfield - then I don't see how you can do anything. If its just getting the anchor that fails, then you could enumerate all the paragraphs and text portions in the document till you find the matching textfield - that would be very slo...
MRI is easy, you install it, make sure the library is loaded so it can be used then you type somewhere in your code, MRI whateverobjectname and up pops a window showing all the methods and properties available for your object. I find it indespensible. Edit, this also: https://extensions.openoffice.o...
In my first post I gave you a one line way - provided you know the index. The reason a loop is needed with the name is because get by name isn't available, just get by index there. You can simplify getting by name to a one line call by putting the loop in separate function as Lupp has done, and that...
I suggest MRI and learn how to inspect objects and you can examine it yourself. https://forum.openoffice.org/en/forum/viewtopic.php?t=49294 You don't say the line the error occurred. If its this one it could be because the group isn't a control and that's what Form.getByName gets. GroupBox = Form.ge...
Lupp's code works for me in LO as well. The simplest version going from the name (testGroupSh in Lupp's document) would be something like this: dim comp,i comp = thiscomponent for i = 0 to comp.drawpage.getcount -1 with comp.drawpage.getbyindex(i) if .name = "testGroupSh" then .Visible = f...