10 messages in org.openoffice.fr.progRe: [prog] [Base] Probléme assignatio...
FromSent OnAttachments
Arnaud POUSSIERDec 14, 2006 9:22 am 
Christine BrouDec 14, 2006 11:23 am 
Arnaud POUSSIERDec 15, 2006 12:20 am 
Alain NowakDec 15, 2006 3:37 am 
Arnaud POUSSIERDec 15, 2006 4:57 am 
Laurent GodardDec 15, 2006 5:11 am 
Arnaud POUSSIERDec 15, 2006 7:17 am 
Christine BrouDec 15, 2006 9:40 am 
Arnaud POUSSIERDec 15, 2006 9:58 am 
Arnaud POUSSIERDec 15, 2006 10:39 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:Re: [prog] [Base] Probléme assignation de macroActions...
From:Arnaud POUSSIER (arna@douane.finances.gouv.fr)
Date:Dec 15, 2006 7:17:54 am
List:org.openoffice.fr.prog

Bonjour, et merci de ton aide Cependant j'ai un soucis au niveau de l'appel de la macro, j'ai le message d'erreur suivant: "Runtime error Basic La sous procédure ou procédure fonctionnelle n'est pas définie"

En espérant ne pas être trop "lourd" je remets les deux macro en cause:

Macro sur le premier formulaire:

Sub OuvrirFormulaire() dim optFichier(2) as new com.sun.star.beans.PropertyValue

monDoc = thisComponent lesForm = monDoc.Parent.FormDocuments monForm = lesForm.getByName("Monformulaire")

optFichier(0).Name = "ActiveConnection" optFichier(0).Value = monDoc.Parent.DataSource.getConnection("","") optFichier(1).Name = "OpenMode" optFichier(1).Value = "open"

lesForm.loadComponentFromURL(monForm.Name, "", 0, optFichier()) monDoc = lesForm.loadComponentFromURL(monForm.Name, "", 0, optFichier()

call FullOn(monDoc)

End Sub

Macro sur le second formulaire pour le plein écran:

sub FullOn (leDoc)

rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame

document = leDoc.CurrentController.Frame

dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "FullScreen" args1(0).Value = true

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

end sub

Laurent Godard a écrit:

Bonjour

changement mineurs à faire

sub FullOn

sub FullOn (leDoc)

rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame

document = leDoc.CurrentController.Frame

dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "FullScreen" args1(0).Value = true

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

end sub

il te rest ensuite a changer l'appel de FullOn avec call FullOn(monDoc)