OpenOffice.org OpenOffice - 3.3 Guía básica Pagina 302

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 434
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 301
Figure 309: Select the module and name the macro
The created macro is saved in Module1 of the Standard library in the Untitled 1
document. Listing 1 shows the contents of the macro.
Listing 1. Paste special with multiply.
sub PasteMultiply
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(5) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Flags"
args1(0).Value = "A"
args1(1).Name = "FormulaCommand"
args1(1).Value = 3
args1(2).Name = "SkipEmptyCells"
args1(2).Value = false
args1(3).Name = "Transpose"
args1(3).Value = false
args1(4).Name = "AsLink"
args1(4).Value = false
args1(5).Name = "MoveMode"
args1(5).Value = 4
dispatcher.executeDispatch(document, ".uno:InsertContents", "", 0,
args1())
end sub
302 OpenOffice.org 3.3 Calc Guide
Vista de pagina 301
1 2 ... 297 298 299 300 301 302 303 304 305 306 307 ... 433 434

Comentarios a estos manuales

Sin comentarios