[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libreoffice-users] Calc macro - selection by keyboard not recorded
- Subject: Re: [libreoffice-users] Calc macro - selection by keyboard not recorded
- From: Andrew Douglas Pitonyak <email@example.com>
- Date: Sat, 19 Jul 2014 00:44:56 -0400
- To: firstname.lastname@example.org
I generally send only to the list. This is what you missed if it did not make it.
You are doing nothing wrong.... The macro recorder fails to record certain actions and should be reworked from the start, but, that is not likely to happen (sadly). If you want to set the first character to bold regardless of what you have selected, you could run something like this (your welcome):
Dim oOldSelection 'The original selection of cell ranges
Dim iRows As Integer
Dim iCols As Integer
Dim iRow As Integer
Dim iCol As Integer
oDoc = ThisComponent
REM store the current selection
oOldSelection = oDoc.CurrentSelection
If HasUnoInterfaces(oOldSelection, "com.sun.star.text.XText") Then
ElseIf HasUnoInterfaces(oOldSelection, "com.sun.star.sheet.XSheetCellRanges") Then
oCells = oOldSelection.getCells()
oEnum = oCells.createEnumeration()
Do While oEnum.hasMoreElements()
oCell = oEnum.nextElement()
ElseIf HasUnoInterfaces(oOldSelection, "com.sun.star.sheet.XSheetCellRange") Then
iCols = oOldSelection.getColumns().getCount() - 1
iRows = oOldSelection.getRows().getCount() - 1
For iRow = 0 To iRows
For iCol = 0 To iCols
oCell = oOldSelection.getCellByPosition(iCol, iRow)
Print "Help, what is selected"
oCurs = oText.createTextCursor()
' Goto start of text but do not select anything.
If oCurs.goRight(1, True) Then
oCurs.CharWeight = com.sun.star.awt.FontWeight.BOLD
On 07/17/2014 01:41 AM, email@example.com wrote:
david_lynch <firstname.lastname@example.org> posted to email@example.com at 0:23 on Sun, 13 Jul 2014 about Calc macro - selection by keyboard not recorded:
On 13/07/2014 01:46, Andrew Douglas Pitonyak wrote:What did Andrew suggest? As far as I can tell, the snipped suggestion never made it to this list.
On 07/12/2014 04:41 PM, david_lynch wrote:<snip>
Although reasonably experienced using calc, I haven't used macros much.You are doing nothing wrong.... The macro recorder fails to record
What am I doing wrong please?
220.127.116.11 on Windows 8
certain actions and should be reworked from the start, but, that is
not likely to happen (sadly). If you want to set the first character
to bold regardless of what you have selected, you could run something
like this (your welcome):
This is a perfect example of why it is stupid to not post ordinary replies to this list!
Many thanks Andrew. I had simplified what I wanted: your code will, Ithink, enable me to complete the task.
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
|[libreoffice-users] Calc macro - selection by keyboard not recorded||david_lynch <email@example.com>|
|Re: [libreoffice-users] Calc macro - selection by keyboard not recorded||david_lynch <firstname.lastname@example.org>|
|Re: [libreoffice-users] Calc macro - selection by keyboard not email@example.com|
- Prev by Date: Re: [libreoffice-users] Small bug(?) when loading file into Writer
- Next by Date: [libreoffice-users] Re: [libreoffice-marketing] Re: [libreoffice-l10n] Kerala Legislative Assembly has moved to Free Software and Libreoffice
- Previous by thread: Re: [libreoffice-users] Calc macro - selection by keyboard not recorded
- Next by thread: [libreoffice-users] Google Spreadsheet and LibreOffice calc compatibility