ciao Piero,
Alle 23:10, giovedì 8 dicembre 2005, Piero C. ha scritto:
> Buon giorno a tutti. Mi chiamo Piero... sono un neofita per quanto
> riguarda Open Office. Mi ritrovo a dover creare un documento. Ho
> tentato di registrare una macro.. per insierire una text section a due
> colonne... solo che quando avvio la macro... mi crea solo la sezione
> senza parametri...
E' strano perchè io ho provato a registrare la stessa operazione e la macro
che mi risulta è diversa dalla tua e funziona correttamente.
Che versione di ooo stai usando?
In ogni caso, sotto trovi la mia macro registrata in openoffice.org 2.0 :
saluti
Paolo M
REM ***** BASIC *****
sub Main
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 ----------------------------------------------------------------------
dim args1(7) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Columns"
args1(0).Value = 2
args1(1).Name = "RegionName"
args1(1).Value = "Sezione1"
args1(2).Name = "RegionCondition"
args1(2).Value = ""
args1(3).Name = "RegionHidden"
args1(3).Value = false
args1(4).Name = "RegionProtect"
args1(4).Value = false
args1(5).Name = "LinkName"
args1(5).Value = ""
args1(6).Name = "FilterName"
args1(6).Value = ""
args1(7).Name = "SubRegion"
args1(7).Value = ""
dispatcher.executeDispatch(document, ".uno:InsertSection", "", 0, args1())
end sub
>
>
> sub Main2
> 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 ----------------------------------------------------------------------
> dim args1(7) as new com.sun.star.beans.PropertyValue
> args1(0).Name = "Columns"
> args1(0).Value = 2
> args1(1).Name = "RegionName"
> args1(1).Value = "ColumnFormat"
> args1(2).Name = "RegionCondition"
> args1(2).Value = ""
> args1(3).Name = "RegionHidden"
> args1(3).Value = false
> args1(4).Name = "RegionProtect"
> args1(4).Value = false
> args1(5).Name = "LinkName"
> args1(5).Value = ""
> args1(6).Name = "FilterName"
> args1(6).Value = ""
> args1(7).Name = "SubRegion"
> args1(7).Value = ""
>
> dispatcher.executeDispatch(document, ".uno:InsertSection", "", 0, args1())
>
>
> end sub
>
>
> sub Main3
> 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 ----------------------------------------------------------------------
> dim args1(6) as new com.sun.star.beans.PropertyValue
> args1(0).Name = "RegionName"
> args1(0).Value = "FullWidth1"
> args1(1).Name = "RegionCondition"
> args1(1).Value = ""
> args1(2).Name = "RegionHidden"
> args1(2).Value = false
> args1(3).Name = "RegionProtect"
> args1(3).Value = false
> args1(4).Name = "LinkName"
> args1(4).Value = ""
> args1(5).Name = "FilterName"
> args1(5).Value = ""
> args1(6).Name = "SubRegion"
> args1(6).Value = ""
>
> dispatcher.executeDispatch(document, ".uno:InsertSection", "", 0, args1())
>
>
> end sub
>
> la macro dovrebbe creare appunto una text section con 2 colonne con uno
> spazio tra di esse di 5 mm.
>
> Vi chiedo cortesemente aiuto.
>
> Piero
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]