Good morning
I am using openoffice2 .2 on a mac powerbook G4 - standard processor not intel with mac OSx.4

I have used excel for some time and am used to writing and running macros in that environment but am having some difficulties learning to do this in calc

1. Is there a way to put the macro command from the TOOLS menu into the Standard toolbar. I have tried customising the toolbar but the only options under 'add' appear to be the ones for that menu. this is something I did in the dreaded excel and I would like to be able to do it in calc.

2. I daily need to convert csv files to .ods. and then run some fairly simple tasks. Is it possible to write a macro which opens the csv file and then automates the tasks. I have tried doing this through the record button and recording the macro in the ods file which will use ( reference) the data from the converted csv file. It appeared to record ok but when I tried to run it absolutely nothing happened. Can any one tell me what I am doing wrong or whether what I am trying to so is impossible. One of the reasons for trying to get a macro to-open and convert the csv file is so that I do not have to hunt for the "text csv" file type in the drop down box which I find quite awkward (maybe being a pensioner is part-of that problem!) If I cannot write a macro to do the opening and conversion could someone suggest a way of making this a bit easier

Hope one-of you good people can help

I give the text of the macro as stored below the phrase highlighted in red is also in red in the openoffice window!


Rem Attribute VBA_ModuleType=VBADocumentModule
Option VBASupport 1
Sub ThisWorkbook
Rem
End Sub


sub BDS1
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 ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:Open", "", 0, Array())


end sub


regards

Frances
London

Reply via email to