Issues with macro recorder??

Wondering if there is any documentation on things that don't work with the
recorder.

Just tried again and most of it worked, but some issues came up.

First, entered a formula, and it worked in the recording, but in playing the
macro it failed. Was able to modify the lines, and got it to work.

dim args7(0) as new com.sun.star.beans.PropertyValue
args7(0).Name = "StringName"
args7(0).Value = "=if(I1=""Life"";""12/18"";i1)"

Had to add the double quotes versus how it was recorded.

Second issue was it deleted two different columns. When recording clicked
on the column with mouse, and deleted each column. Record didn't record
anything of clicking on the columns, but just the delete command. Added a
goto cell and got that to work as well.

dim args16(0) as new com.sun.star.beans.PropertyValue
args16(0).Name = "ToPoint"
args16(0).Value = "$h$1"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args16())

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

dim args17(0) as new com.sun.star.beans.PropertyValue
args17(0).Name = "ToPoint"
args17(0).Value = "$L$1"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args17())

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

I have only been successful at using keyboard commands. Sometimes interpretations in the code require correction. In general, it usually works though.

Hello Michael,

Second issue was it deleted two different columns. When recording clicked
on the column with mouse, and deleted each column. Record didn't record
anything of clicking on the columns, but just the delete command. Added a
goto cell and got that to work as well.

the recorder has no prior knowledge about the active cell. You have to set it before any other action.

-> When I use the recorder to act upon cells/columns/rows, I usually start with Ctrl+Home to set things clearly, then I move the active cell to the wanted place (for quick moves you may try using the cell name field).

HTH,

recorder??
<jean-francois.nifenecker@laposte.net>
Date sent: Fri, 21 Sep 2018 07:25:28 +0200

Hello Michael,

>
> Second issue was it deleted two different columns. When recording clicked
> on the column with mouse, and deleted each column. Record didn't record
> anything of clicking on the columns, but just the delete command. Added a
> goto cell and got that to work as well.
>

the recorder has no prior knowledge about the active cell. You have to
set it before any other action.

Yes, I agree with that. But in this case during the recording of the macro, I
used the mouse to select the column I was going to delete, and the did the
deletion of the column, and then selected the other column, and deleted it as
well. Worked perfectly during the record process.

The playback of the macro failed, since the recorder had nothing in the
process of the mouse selecting the column to be delete. The record just had
delete column, delete column. For some reason the use of the mouse to click
on the top of the column was never recorded, and that is how I generally
select the columns to delete during regular usage. I did them modify the
recorded macro to add going to the column before each delete column
operation and it now works. Could have recorded the macro using a goto the
cell in the column, and it probable would have worked correctly, but the issue
was that the recorder failed to record a proceess that works manually??

-> When I use the recorder to act upon cells/columns/rows, I usually
start with Ctrl+Home to set things clearly, then I move the active cell
to the wanted place (for quick moves you may try using the cell name field).

Yes, most of my macro start with the Ctrl-Home. Have just run into a few
things were the recorder doesn't fully record the process as it was done. The
macro process is different than the old days. Did a lot of work with Quattro
Pro, and never had issues with its recorder. The recording process made
commands that matched with the keys pressed. This method has vastly
different options. Also, you combine macros easily. Because of the process,
you have to renumber all the options if you insert something, or combine
macros. Just different.

Thanks for the reply.