Search found 251 matches

by Tommy
Thu Jan 21, 2016 8:16 am
Forum: Macros and UNO API
Topic: [Solved] Check the state of a toolbar and then execute code
Replies: 10
Views: 2276

Re: [solved] Check the state of a toolbar and then execute c

thank you very much
this one works fine.
thanks for all your help.
by Tommy
Wed Jan 20, 2016 7:26 am
Forum: Macros and UNO API
Topic: [Solved] Check the state of a toolbar and then execute code
Replies: 10
Views: 2276

Re: Check the state of a specific toolbar and then execute c

hi there. thanks for giving it another try. in my setup there's an issue though... the macro always show "toolbar closed" message even if the "test" toolbar is open I think that this code line has an error: if MenuStatus(oAccCtx, "test") then probably we are not giving ...
by Tommy
Tue Jan 19, 2016 3:17 pm
Forum: Macros and UNO API
Topic: [Solved] Check the state of a toolbar and then execute code
Replies: 10
Views: 2276

Re: Check the state of a specific toolbar and then execute c

I see it cited many times inside that macro.
I suppose I have to remove those lines to make it work if I don't have MRI installed
by Tommy
Tue Jan 19, 2016 2:11 pm
Forum: Macros and UNO API
Topic: [Solved] Check the state of a toolbar and then execute code
Replies: 10
Views: 2276

Re: Check the state of a specific toolbar and then execute c

thanks 4 your reply.

is the MRI scrictly necessary to operate the macro?

I tried to install MRI on my LibO 5.0.4.2 but installation aborted

so I have to do that without MRI
by Tommy
Sun Jan 17, 2016 8:48 am
Forum: Macros and UNO API
Topic: [Solved] Check the state of a toolbar and then execute code
Replies: 10
Views: 2276

[Solved] Check the state of a toolbar and then execute code

I wanna execute some code inside a macro only if a specific custom toolbar called "test" is in "show" state. otherwise if that toolbar is in "hidden" state no code should be executed let's say something like: if "private:resource/toolbar/custom_toolbar_test" i...
by Tommy
Sat Jan 16, 2016 10:46 am
Forum: Macros and UNO API
Topic: [Solved] Show/hide toolbar
Replies: 4
Views: 5019

Re: [Solved] Show/hide toolbar

ok. I'll open a new thread later.
thanks 4 your reply.
by Tommy
Sat Jan 16, 2016 8:12 am
Forum: Macros and UNO API
Topic: [Solved] Show/hide toolbar
Replies: 4
Views: 5019

Re: [Solved] Show/hide toolbar

interesting code. I bumped into it after searching for a solution about a related task. I wanna execute some code inside a macro only if a specific custom toolbar called "test" is in "show" state. otherwise if that toolbar is in "hidden" state no code should be executed...
by Tommy
Sat Jun 28, 2014 6:06 pm
Forum: Announcements
Topic: Heartbleed: we are safe
Replies: 2
Views: 21024

Re: Heartbleed: we are safe

for the record LibreOffice 4.2.3 and following releases are Heartbleed safe too.

http://blog.documentfoundation.org/2014 ... -download/
by Tommy
Sat Jun 28, 2014 5:33 pm
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [Solved] copy text fields content as strings

I'm a newbie about coding macros and that code tweak that looked so simple to an expert like you, was not immediate to me.

I see you prefer spending your time insulting people rather than giving help... shame on you.
this forum needs more people like Rory, RPG and MTF.
by Tommy
Sat Jun 28, 2014 4:50 pm
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [REQ] copy text fields content as strings

@MTP thank you very much. your edited version of Rory's macro does exactly what I was looking for. here's the correct working code Sub ReadTextFields Dim oFields : oFields = ThisComponent.getTextFields Dim oEnum Dim ThisField Dim s As String oEnum = oFields.createEnumeration While oEnum.HasMoreEleme...
by Tommy
Sat Jun 28, 2014 3:46 pm
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [REQ] copy text fields content as strings

Does the [Thisfield.Anchor.String] not assign the textfield content to your variable? You wouldn't assign it to itself, you'd assign it to the variable you wanted to have the text. That's how I interpreted the macro Rory posted. hi MTP, the macro Rory posted converts the text field into plain text ...
by Tommy
Sat Jun 28, 2014 1:56 pm
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [REQ] copy text fields content as strings

REQ = request

get a life, Villeroy.
by Tommy
Sat Jun 28, 2014 10:07 am
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [REQ] copy text fields content as strings

thanks for your help but it's not exactly what I'm looking for. I do not need to "convert" the text field into plain text, like that macro does in the test file I have 3 text field (those written in bold light blue) and if you double click on them you will see that each one has a name and ...
by Tommy
Sat Jun 28, 2014 9:05 am
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

Re: [REQ] copy text fields content as strings

the extracted string will reused in another macro which compares the correspondence between file name and text fields data, anyway I won't go in further details since I already know how to do this second part and I do not need help about it. the only thing I miss is how to extract those simple strin...
by Tommy
Sat Jun 28, 2014 8:09 am
Forum: Macros and UNO API
Topic: [Solved] Copy text fields content as strings
Replies: 14
Views: 5247

[Solved] Copy text fields content as strings

hi there, I have this test .odt file which has 3 text fields with text and numbers inside (it's a medical report template which patient name, date of birth and exam date) I need a macro to extract the text in those fields as 3 separate strings. basically in the mockup file I need to extract the stri...
by Tommy
Sat Jun 28, 2014 7:36 am
Forum: Macros and UNO API
Topic: [Solved] Impress macro to move selected slide to last
Replies: 2
Views: 1834

Re: [SOLVED] Impress macro to move selected slide to last

@ F3K Total
sorry for late reply.
your macro is perfect. thanks!!!
by Tommy
Wed Mar 19, 2014 5:33 pm
Forum: Macros and UNO API
Topic: [Solved] Impress macro to move selected slide to last
Replies: 2
Views: 1834

[Solved] Impress macro to move selected slide to last

is there any way to accomplish that?
having to manually drag a selected slide to the last position can be annoying if you have a very long presentation

a macro to directly move that slide to the last position would be a time-saver.
by Tommy
Tue Aug 20, 2013 5:30 pm
Forum: Writer
Topic: [Solved] Rotating pictures
Replies: 7
Views: 4007

Re: Rotating pictures

by Tommy
Tue Aug 20, 2013 5:07 pm
Forum: Writer
Topic: [Solved] Autocorrect 10'000 entries limit. True or not?
Replies: 15
Views: 10172

Re: [Solved] Autocorrect 10'000 entries limit. True or not?

just an update to tell that the LibO team expanded the autocorrect capacity from 65K to 4 billions entry. this improvement is available since LibO 4.0.0
https://bugs.freedesktop.org/show_bug.cgi?id=48729

AFAIK ApacheOpenOffice still has a limit of 65K autocorrect entries.
by Tommy
Wed May 08, 2013 9:56 pm
Forum: Macros and UNO API
Topic: [Solved] Close Windows folder with a macro
Replies: 4
Views: 7452

Re: Close Windows folder with a macro

@Charlie Young
thanks, that code works. I had just to edit the folder path.
adding [solved] tag to title
by Tommy
Tue Dec 11, 2012 9:48 pm
Forum: Macros and UNO API
Topic: [Solved] Close Windows folder with a macro
Replies: 4
Views: 7452

[Solved] Close Windows folder with a macro

hi there.
this simple macro opens the "C:\" folder using Windows file manager.

Code: Select all

sub test
Shell("C:\Windows\explorer.exe",,"C:\")
End sub
I wonder if it's possible to do the opposite...
I mean a macro that closes a given Windows folder.
by Tommy
Sun Nov 18, 2012 4:22 pm
Forum: Macros and UNO API
Topic: [Solved] autocorrect-to-csv.py doesn't work on Windows
Replies: 3
Views: 3953

Re: [Solved] autocorrect-to-csv.py doesn't work on Windows

for the record here's a modified version of the script to make it work on Windows using X-LibreOffice, giving the exact path of the autocorrect file (you should modify according to the location if has on your PC) #-*- coding: utf-8 -*- import os, sys, zipfile, xml.dom.minidom #######################...
by Tommy
Sat Nov 10, 2012 4:21 pm
Forum: General Discussion
Topic: First results from Renaissance project
Replies: 53
Views: 38431

Re: First results from Renaissance project

Renaissance (aka OOo Ribbonization) is dead. I'm so happy about that.
by Tommy
Sat Nov 10, 2012 4:13 pm
Forum: Macros and UNO API
Topic: [Solved] autocorrect-to-csv.py doesn't work on Windows
Replies: 3
Views: 3953

Re: autocorrect-to-csv.py doesn't work on Windows

thanks Karolus. according to what you suggested I installed python 2.7.3 on my Vista 64bit PC. I was able to make the .py script work with the command line. I'm just curious why I cannot assign the .py extension files to be opened by python.exe itself, instead of using the command line each time. if...
by Tommy
Sat Nov 10, 2012 2:05 am
Forum: Code Snippets
Topic: Alternative script organizer for Python macro
Replies: 27
Views: 92056

Re: Alternative script organizer for Python macro

@hanya
very nice script. thanks 4 sharing
by Tommy
Sat Nov 10, 2012 1:52 am
Forum: Macros and UNO API
Topic: [Solved] autocorrect-to-csv.py doesn't work on Windows
Replies: 3
Views: 3953

[Solved] autocorrect-to-csv.py doesn't work on Windows

hi, I'm a LibreOffice user. I've found an interesting python macro on this website: http://www.linuxquestions.org/questions/linux-software-2/%5Bsolved%5D-export-autocorrect-entries-from-libreoffice-to-csv-867742/ the code is: #-*- coding: utf-8 -*- import os, sys, zipfile, xml.dom.minidom ##########...
by Tommy
Mon Jul 23, 2012 7:59 am
Forum: Macros and UNO API
Topic: [Solved] Create shortcut to file macro
Replies: 2
Views: 2197

Re: Create shortcut to file macro

thanks rudolfo!!!
that code does exactly what I need!!!
by Tommy
Fri Jul 20, 2012 12:17 pm
Forum: Macros and UNO API
Topic: [Solved] Create shortcut to file macro
Replies: 2
Views: 2197

[Solved] Create shortcut to file macro

the present code copies the file "dummy.txt" from its source location "C:/Test" to a custom destination "C:/" Sub Test FileCopy("C:\Test\dummy.txt", "C:\dummy.txt") End Sub I wonder if it's possible with OOo BASIC to create a shortcut to the original...
by Tommy
Sat May 12, 2012 4:17 pm
Forum: Macros and UNO API
Topic: [Solved] Using RegEx with the Instr function
Replies: 7
Views: 5223

Re: using RegEx with the Instr function

thanks for infos. setting [SOLVED] tag
by Tommy
Sat May 12, 2012 8:43 am
Forum: Macros and UNO API
Topic: [Solved] Using RegEx with the Instr function
Replies: 7
Views: 5223

Re: using RegEx with the Instr function

@RoryOF
thanks!!! the IsNumeric function solves my issue!!!

one last question, for my further OOo-BASIC learning, the use of RegEx inside the Instr function is somewhat possible or not?

p.s. once I receive a final statement about it I'll add the [SOLVED] tag