Re: [api-dev] Multiple cells in macros

2006-06-12 Thread Moisés Márquez Gil
Marc Santhoff wrote: Some actions are not tracked by the recorder. For your special task you may have more luck if you do it this way: - select the start of your range by mouse (A1) - hold the SHIFT key and navigate to the last cell of your range (A5) by keyboard How to select non consecutive

Re: [api-dev] Multiple cells in macros

2006-06-05 Thread Marc Santhoff
Am Montag, den 05.06.2006, 10:36 +0200 schrieb Moisés Márquez Gil: > Gerrit Jasper wrote: > > > That's funny. When I record a macro and save it, and then run it, it > does everything it was told to do. > > But I would describe my actions differently. What I do is: > > Tools-Macro-RecordMacro

Re: [api-dev] Multiple cells in macros

2006-06-05 Thread Moisés Márquez Gil
Gerrit Jasper wrote: > That's funny. When I record a macro and save it, and then run it, it does everything it was told to do. > But I would describe my actions differently. What I do is: > Tools-Macro-RecordMacro | Select cells | -> | Do something | -> | Stop Recording | -> | Sa

Re: [api-dev] Multiple cells in macros

2006-06-02 Thread Gerrit Jasper
Moisés Márquez Gil wrote: I need a macro that do these (I wrote the steps I want to do) | Select cells | -> | Do something | -> | Record macro | -> | Execute macro | 'Do something' could be: erase, copy, give a format ... The problem is that when I do this operation it go right. But, later .

Re: [api-dev] Multiple cells in macros

2006-05-29 Thread Moisés Márquez Gil
Gerrit Jasper wrote: > Moisés, Stephan, > > Excuse me for butting in. I just found out that you switched to the > [api-dev] list. I get the funny feeling that the two of you are not > talking about the same thing. > > Moisés, > > (Moisés Márquez Gil wrote:) > >> I need to select and process severa

Re: [api-dev] Multiple cells in macros

2006-05-21 Thread Gerrit Jasper
Moisés, Stephan, Excuse me for butting in. I just found out that you switched to the [api-dev] list. I get the funny feeling that the two of you are not talking about the same thing. Moisés, I think Stephan Wunderlich gave you the exact answer you need. Unless you mean something entirely differ

Re: [api-dev] Multiple cells in macros

2006-05-19 Thread Moisés Márquez Gil
Hi Stephan, I've found the problem. When is set the Print all sheets option although you tell to print the selection it prints all the pages. Thank you a lot Moises - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [api-dev] Multiple cells in macros

2006-05-19 Thread Stephan Wunderlich
Hi Moisés, This fails for me. I don't know if it's for the language. I've Spanish language's pack installed, so ... I don't know. I've tried to traslate the value's names to that in Spanish, but it don't sucess. I will try it changing the language. But it is not the solution. The API is in

Re: [api-dev] Multiple cells in macros

2006-05-19 Thread Moisés Márquez Gil
That is strange, since it worked for me ... well I removed some args that I though would be superfluous ... you could give the following a try - sub printSelection xFrame = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHel

Re: [api-dev] Multiple cells in macros

2006-05-19 Thread Stephan Wunderlich
Hi Moisés, sub Main ThisComponent.currentController.select(ThisComponent.Sheets(3)) printSelection ThisComponent.currentController.select(ThisComponent.Sheets(4)) printSelection end sub sub printSelection xFrame = ThisComponent.CurrentContro

Re: [api-dev] Multiple cells in macros

2006-05-19 Thread Moisés Márquez Gil
from the top of my head I'd suggest to select the sheet you want to print and then print the current selection. Somethings like the following should print the sheets 4 and 5 sub Main ThisComponent.currentController.select(ThisComponent.Sheets

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Stephan Wunderlich
Hi Moisés, I saw it before. But if the sheet don't fit in a page ... what can I do ? from the top of my head I'd suggest to select the sheet you want to print and then print the current selection. Somethings like the following should print the sheets 4 and 5 ---

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Moisés Márquez Gil
Stephan Wunderlich wrote: if those sheets each fit on a page you could use the Property "Pages" to pass it to the XPrintable.print() call. E.g. Dim printProps(0) as new com.sun.star.beans.PropertyValue printProps(0).Name="Pages" printProps(0).Value="4;5" ThisComponent.print(printProps()) Hop

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Stephan Wunderlich
Hi Moisés Hi, this is correct. But I want to say ... print sheets 4,5. Only these sheets. if those sheets each fit on a page you could use the Property "Pages" to pass it to the XPrintable.print() call. E.g. Dim printProps(0) as new com.sun.star.beans.PropertyValue printProps(0).Name="Page

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Moisés Márquez Gil
ThisComponent.print(dimArray()) prints all sheets that contain contents for me, when attached to the document. Hi, this is correct. But I want to say ... print sheets 4,5. Only these sheets. Thanx Moises - To unsubscri

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Stephan Wunderlich
Hi, I use this code. But I want to know if it's a bug and if it can be solved easily. since the macro recorder only recorded your first selection I'd say it is an issue, but I can't say anything about how easy it would be to fix that. Regards Stephan -

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Moisés Márquez Gil
well the given code snippet wanders to Cell B5 and then deletes the contents ... something similar and for all your three Cells does 'all is the sum of all css.sheet.CellFlags all = 895 xSheet = ThisComponent.Sheets(0) xCellRange = xSheet.getCellRangeByName("B5") xCellRange.clearContents(all)

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Stephan Wunderlich
Hi, sub borrarSeleccionMultiple dim document as object dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value =

Re: [api-dev] Multiple cells in macros

2006-05-18 Thread Moisés Márquez Gil
Stephan Wunderlich wrote: Hi, When I record a macro that do an operation in several cells this only work when I'm recording it. Later, when I execute this only work for the first cell. what exactly did you try to record ? Maybe the code the recorder produced could give an insight too. sub

Re: [api-dev] Multiple cells in macros

2006-05-17 Thread Stephan Wunderlich
Hi, When I record a macro that do an operation in several cells this only work when I'm recording it. Later, when I execute this only work for the first cell. what exactly did you try to record ? Maybe the code the recorder produced could give an insight too. The same thing when I want to

[api-dev] Multiple cells in macros

2006-05-17 Thread Moisés Márquez Gil
Hi, When I record a macro that do an operation in several cells this only work when I'm recording it. Later, when I execute this only work for the first cell. The same thing when I want to print two or more sheets. It only print the first one. Thanx ---