In visual basic express, I can highlight and automatically copy a text box text (I think to clipboard).
TextBox1.Focus() 'VBA
TextBox1.SelectAll() 'VBA
TextBox1.Copy() 'VBA
I've looked at clipboard operation text in OOBasic, but it's very complicated and verbose.
Is there a way to access the controls (Textbox) properties to highlight and copy an unbound textbox text on a form?
[Solved] Copy and paste from unbound text box on Form
[Solved] Copy and paste from unbound text box on Form
Last edited by coopdmc on Wed Apr 12, 2017 1:27 am, edited 1 time in total.
open office 4.1.3 on windows 10 home pc
Re: Copy and paste from unbound text box on Form
Well, you start with the most complex parts of this API without knowing the basic parts.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Copy and paste from unbound text box on Form
Thanks for the response. I looked at several documents regarding application programming interface, using the same interface for several programming languages, and universal network objects
I looked at the IDL Reference at http://www.openoffice.org/api/docs/comm ... le-ix.html. But should a casual user of OpenOffice really need to have a degree in these fields to use OpenOffice at a slightly higher level (such as writing macros)? If so, then I'll certainly pursue this course of action. Do you have a starting point of reference regarding "knowing the basic parts" (of the api)? Thank you for getting me pointed in the right direction!
I looked at the IDL Reference at http://www.openoffice.org/api/docs/comm ... le-ix.html. But should a casual user of OpenOffice really need to have a degree in these fields to use OpenOffice at a slightly higher level (such as writing macros)? If so, then I'll certainly pursue this course of action. Do you have a starting point of reference regarding "knowing the basic parts" (of the api)? Thank you for getting me pointed in the right direction!
open office 4.1.3 on windows 10 home pc
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Copy and paste from unbound text box on Form
The oO API is complicated, so writing macro code is not something a "casual user" would likely tackle.But should a casual user of OpenOffice really need to have a degree in these fields to use OpenOffice at a slightly higher level (such as writing macros)?
Andrew Pitonyak's book “OpenOffice.org Macros Explained” is available as a free download fromDo you have a starting point of reference regarding "knowing the basic parts" (of the api)? Thank you for getting me pointed in the right direction!
http://www.pitonyak.org/oo.php
Also look for his “Database Macros” download
There is another book "Database Programming with OpenOffice.org Base & Basic" that I find helpful, but it isn't free.
http://www.baseprogramming.com/
Also look through the Base Tutorials and Examples and Code Snippets areas for macro examples.
To do much macro programming you will need object inspection tool.
viewtopic.php?f=74&t=49294
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: Copy and paste from unbound text box on Form
TextBox1.Focus() 'VBA
TextBox1.SelectAll() 'VBA
TextBox1.Copy() 'VBA
No, the casual user needs nothing but click … ctrl+a … ctrl+cBut should a casual user of OpenOffice really need to have a degree in these fields
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 7.6 flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
Re: Copy and paste from unbound text box on Form
I've quickly found these
Get the textbox contents:
viewtopic.php?f=20&t=84203
Copy to Clipboard:
viewtopic.php?f=20&t=77313
The code to copy to clipboard is complicated - but if you put it in a separate module - once that's done its as easy to call as the VBA copy function. You just need to do a little work first.
Get the textbox contents:
viewtopic.php?f=20&t=84203
Copy to Clipboard:
viewtopic.php?f=20&t=77313
The code to copy to clipboard is complicated - but if you put it in a separate module - once that's done its as easy to call as the VBA copy function. You just need to do a little work first.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Copy and paste from unbound text box on Form
Thanks, all of you for you for your input, very useful links. I've taken another route for my solution, using shell to open a visual basic .exe to generate a random password and convert to hexadecimal for storage:
REM ***** BASIC *****
Sub Main
'20.122. Shell Function (Andrew Pitonyik)
Dim vRC As Variant
Dim sd as integer
sd = 0
vRC = Shell("C:\Users\"user"\Documents\Visual Studio 2015\Projects\encode_030717_2341\encode_030717_2341\bin\Debug\encode_030717_2341.exe", sd)
'(or your path to .bat or .exe program)
End Sub
I'll consider this topic as solved. I knew about Ctrl-C, copy, but was unaware of Ctrl-A, so I did learn something, hi!
REM ***** BASIC *****
Sub Main
'20.122. Shell Function (Andrew Pitonyik)
Dim vRC As Variant
Dim sd as integer
sd = 0
vRC = Shell("C:\Users\"user"\Documents\Visual Studio 2015\Projects\encode_030717_2341\encode_030717_2341\bin\Debug\encode_030717_2341.exe", sd)
'(or your path to .bat or .exe program)
End Sub
I'll consider this topic as solved. I knew about Ctrl-C, copy, but was unaware of Ctrl-A, so I did learn something, hi!
open office 4.1.3 on windows 10 home pc