4 messages in org.openoffice.fr.prog[prog] Ouverture et fermeture de fichier
FromSent OnAttachments
Arnaud POUSSIEROct 18, 2005 6:12 am 
JovialOct 19, 2005 2:04 am 
Bernard MarcellyOct 19, 2005 2:16 am 
Arnaud POUSSIEROct 20, 2005 7:34 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:[prog] Ouverture et fermeture de fichierActions...
From:Arnaud POUSSIER (arna@douane.finances.gouv.fr)
Date:Oct 18, 2005 6:12:55 am
List:org.openoffice.fr.prog

Bonjour à tous,

Voilà, j'ai un petit probléme avec une macro que j'avais récupéré via le forum:

J'ai un fichier principal calc " FICHIER_A " avec plusieurs boutons. Chacun de
ces boutons me permettent d'ouvrir un document calc différent, FICHIER_A1,
FICHIER_A2 etc ...........

J'utilise le code suivant afin d'ouvrir l'un de ses documents et de fermer le
fichier principal (tout se fait via un réseau interne)

Sub Oouvrir_A1() Dim doc1 As object ' fichier_A Dim doc2 As object ' fichier_A1 Dim propFich(1) As New com.sun.star.beans.PropertyValue

doc1=thisComponent

doc2=StarDesktop.LoadComponentFromURL(convertToUrl("//001posteréseau/Partage/FICHIER_A1.sxc"),"_blank",0,
propFich())

doc1.close(true)

End Sub

Mon soucis est le suivant, le fichier A1 s'ouvre bien mais toute les macro sont
inopérantes. Il doit manquer un argument ou quelque chose comme cela dans le
code mais jusqu'à maintenant je n'ai rien trouvé. Si quelqu'un peut m'éclairer Merci d'avance

Bonne journée