6 messages in org.openoffice.fr.progImpression sous condition
FromSent OnAttachments
Christophe MathysenFeb 14, 2007 12:41 am 
Bernard MarcellyFeb 14, 2007 1:03 am 
Christophe MathysenFeb 14, 2007 1:49 am 
Christophe MathysenFeb 14, 2007 2:00 am 
Bernard MarcellyFeb 14, 2007 3:16 am 
Christophe MathysenFeb 14, 2007 4:32 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Impression sous conditionActions...
From:Christophe Mathysen (chri@fmsb.be)
Date:Feb 14, 2007 12:41:45 am
List:org.openoffice.fr.prog

Bonjour à tous,

Dans un calc, nous complétons des infos dans un panneaux, en fonction des cases cochées, nous imprimons - devrions imrpimer.... - tel ou tel document

En fait chaque doc est une feuille, donc, pour l'impression, un n° de page.

J'ai bidouillé une macro qui fonctionnait hier matin... mais ne fonctionne plus depuis ! Là voici,

sub PrintNL 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 Attest

Attest = thisComponent.currentController.activesheet.getCellRangeByName("B28").value If Attest <> "" then Attest = "3,4,6" Else Attest = "3,4" End if dim args1(2) as new com.sun.star.beans.PropertyValue args1(0).Name = "Copies" args1(0).Value = 1 args1(1).Name = "RangeText" args1(1).Value = Attest args1(2).Name = "Collate" args1(2).Value = false

dispatcher.executeDispatch(document, ".uno:Print", "", 0, args1())

end sub

OU se trouverait l'erreur ??

Merci de vos réponse et bonne journée

http://www.fmsb.be