

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in org.openoffice.fr.progRe: [prog] insertDoc| From | Sent On | Attachments |
|---|---|---|
| Daniel Hucherot | Nov 17, 2008 1:03 pm | |
| Francois Gatto | Nov 17, 2008 9:43 pm | |
| SEGUIN François | Nov 17, 2008 10:04 pm | |
| Daniel Hucherot | Nov 18, 2008 10:39 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] insertDoc | Actions... |
|---|---|---|
| From: | SEGUIN François (fseg...@wanadoo.fr) | |
| Date: | Nov 17, 2008 10:04:14 pm | |
| List: | org.openoffice.fr.prog | |
Bonjour,
Personnellement je ne passe pas par le dispatcher pour faire ça mais je prend l'objet FILEPICKER. Tu en as une très bonne description dans le livre de B. Marcelly et L godard sur la programmation en basic pour OOo. Voici un bout de code que j'utilise avec une boite de sauvegarde mais on peu faire la m^me chose avec une boite d'ouvreture de fichier.
Dim EnregBox as object 'Variable d'accès à la boite de dialogue enregister sous Dim TypeBox(0) as integer 'Variable qui contient le type de boite de dialogue Dim FichierEnreg() as String 'Tableau de récupération des fichiers d'une boite de dialogue enregistrer sous Dim NewNomFichier as string 'Mémorise le nouveau nom du fichier saisi pour sa comparaison
rem * CREATION DES OBJET DE BOITE DE DIALOGUE POUR FICHIER EnregBox = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") Typebox(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION
With EnregBox .Initialize(TypeBox()) .DefaultName = FichierNom .AppendFilter("Writer : *.odt","*.odt") .CurrentFilter = "Writer : *.odt" .SetValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION,0, True)
rem * SI ON FERME LA BOITE AVEC LE BOUTON ENREGISTRER ON EXTRAIT LE NOM DU FICHIER DU CHEMIN COMPLET If .Execute = 1 then '.Execute = 1 (Enregister) .Execute = 0 (Annuler) FichierEnreg() = .Files NewNomFichier = Right(ConvertFromUrl(FichierEnreg(0)),len(FichierNom) + 4) End If End With
Bon courage
François
----- Original Message ----- From: "Daniel Hucherot" <dan...@hucherot.com> To: <pr...@fr.openoffice.org> Sent: Monday, November 17, 2008 10:03 PM Subject: [prog] insertDoc
Bonsoir, lorsque j'écris args2(0).Name = "Name" 'args2(0).Value = "" args2(1).Name = "Filter" args2(1).Value = "Text" dispatcher.executeDispatch(document, ".uno:InsertDoc", "", 0, args2()) avec args2(0).Value en commentaire il ouvre une boite de dialogue pour choisir un fichier Peut-on me dire comment je récupère le nom du fichier sélectionné par l'utilisateur? Merci pour votre aide daniel
--------------------------------------------------------------------- To unsubscribe, e-mail: prog...@fr.openoffice.org For additional commands, e-mail: prog...@fr.openoffice.org
--------------------------------------------------------------------------------------- Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.







