

![]() | 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: |
12 messages in org.openoffice.fr.progRe: [prog] Pointer doc sans l'ouvrir| From | Sent On | Attachments |
|---|---|---|
| Laurent Godard | Oct 15, 2004 8:44 am | |
| Jovial | Oct 15, 2004 8:44 am | |
| Alain Nowak | Oct 15, 2004 8:48 am | |
| Jovial | Oct 15, 2004 10:16 am | |
| Alain Nowak | Oct 15, 2004 10:20 am | |
| Jovial | Oct 15, 2004 10:50 am | |
| Jovial | Oct 15, 2004 5:46 pm | |
| Laurent Godard | Oct 16, 2004 12:12 am | |
| Bernard Marcelly | Oct 16, 2004 3:43 am | |
| Jovial | Oct 16, 2004 7:43 am | |
| Jovial | Oct 19, 2004 3:42 pm | |
| Jovial | Oct 20, 2004 1:48 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] Pointer doc sans l'ouvrir | Actions... |
|---|---|---|
| From: | Alain Nowak (ano...@starxpert.fr) | |
| Date: | Oct 15, 2004 10:20:23 am | |
| List: | org.openoffice.fr.prog | |
SI tu utilise plusieurs fois loadComponentFromUrl dans ton code, ça ouvre plusieurs fois le fichier, et donc dès la deuxième fois la fichier est en lecture seule ! Si tu as besoin de ce fichier a plusieurs endroits de ton code, soit tu conserve et réutilise la variable monDoc, soit tu ferme le document (monDoc.close ou .dispose) et tu le rouvre si nécessaire.
Jovial a écrit :
Merci Laurent et Alain pour vos réponse éclaire :-)
J'arrive à ouvrir le document en question , mais si je repointe dessus, cela m'ouvre un jumeau en lecture seul Je suppose qu'il faut remplacer _blank ....mais j'ai pas trouvé par quoi.
dim arg(0) as new com.sun.star.beans.PropertyValue 'arg(0).Name="Hidden" 'arg(0).Value=false URLfichier= ConvertToUrl("C:\Mes documents\JournalFactures.sxc") monDoc=stardesktop.loadComponentFromURL(URLfichier, "_blank", 0, arg()) Xray.xray monDoc ************************************************ J'aurai voulu pouvoir scanner un répertoire de fichier pour en récupérer une valeur dans chaque fichier il peut y en avoir plusieurs centaines donc cela serait peut être trop lourd avec load component Andrew a fourni dans sont document le code suivant:
oCell = thiscomponent.sheets(0).getcellbyposition(0,0) ' A1
oCell.setFormula("=" &"'file:///home/USER/CalcFile2.sxc'#$Sheet2.K89")
Je voudrai le transposer pour mettre le résultat dans une variable et non dans une cellule afin d'éviter par la suite la boîte dialogue "actualiser les données" au lancement.
JeanLuc
Laurent Godard a écrit :
Bonjour Jean-Luc
MonDocument = ? ' document cible dont je connais le chemin
Il n'y a pas de mystere. L'objet doit etre creer Tu peux charger ton document en mettant la propriete Hidden à true dans les argument du loadComponentFromURL
' code non testé dim arg(0) as new com.sun.star.beans.PropertyValue arg(0).Name="Hidden" arg(0).Value=true monDoc=stardesktop.loadComponentFromURL(URLfichier, "_blank", 0, arg())
attention cependant, certaines fonctionnalites peuvent avoir des difficultes en mode Hidden comme l'export de ficher en PDF
Bon courage
Laurent







