Although reasonably experienced using calc, I haven't used macros much.

I am trying to write a macro to make the first character in a cell bold.
Enter "abc" into cell A1. Record the following keystrokes as a macro:
F2, home, shift->, control-B, enter.
This series of keystrokes does what I want, but running the resulting macro does nothing.
The code generated is:
sub djl1
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SetInputMode", "", 0, Array())

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Bold"
args2(0).Value = true

dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args2())


end sub

The keystrokes home and shift-> appear not to have been recorded: this appears to contradict the explicit advice in Help->Recording a Macro "Selections are recorded only if they are done by using the keyboard (cursor travelling), but not when the mouse is used"

What am I doing wrong please?

David Lynch

4.2.4.2 on Windows 8

--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
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

Reply via email to