Bonjour à tous,

J'ai la macro suivante :

sub ExportPdfPlageNommeZoneImpression

dim document as object, dispatcher as object
dim args(0) as new com.sun.star.beans.PropertyValue
dim propFich(2) as new com.sun.star.beans.PropertyValue
dim filterProps(0) as new com.sun.star.beans.PropertyValue
dim adresseDoc  as string

document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
args(0).Name = "ToPoint"
args(0).Value = "$A$1:$D$449"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args())

filterProps(0).Name = "Selection"
filterProps(0).Value = thisComponent.currentSelection

propFich(0).Name = "FilterName"
propFich(0).Value = "calc_pdf_Export"
propFich(1).Name = "FilterData"
propFich(1).Value = filterProps()

adresseDoc = convertToURL("C:/Documents and Settings/All Users/Bureau/*Dotation*.pdf")
thiscomponent.storeToURL(adresseDoc, propfich())
end sub

je souhaite pouvoir déclarer une variable qui soit le contenu de la cellule C2 (DSI par exemple) Le but est de pouvoir modifier la ligne suivante en : adresseDoc = convertToURL("C:/Documents and Settings/All Users/Bureau/_*Dotation_DSI*_.pdf")

Un grand merci pour votre aide
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@fr.openoffice.org
For additional commands, e-mail: users-h...@fr.openoffice.org

Répondre à