6 messages in org.openoffice.fr.progRe: [prog] Taille d'un document
FromSent OnAttachments
Marceau GUIHARDAug 18, 2006 1:20 am 
Laurent GodardAug 18, 2006 1:31 am 
GloopsAug 18, 2006 3:56 am 
Marceau GUIHARDAug 18, 2006 4:00 am 
Francois GattoAug 18, 2006 12:11 pm 
Marceau GUIHARDAug 18, 2006 1:45 pm 
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] Taille d'un documentActions...
From:Francois Gatto (oo@volcar.org)
Date:Aug 18, 2006 12:11:39 pm
List:org.openoffice.fr.prog

Bonsoir,

Marceau GUIHARD a écrit :

Merci pour cette réponse rapide qui me suffit amplement, je cherchais en vain dans l'API un service qui aurait répondu à la question.

Autre question : Y-a t'il moyen de recharger le document en cours en passant par l'API "Component" autrement que par le call dispatch "uno:Reload" ? Cordialement

Marceau

Une idée

sub ReOpenCsv dim oPathSettings as variant dim aPath as string dim aFile as string dim oDoc as object dim aSeparator as string aSeparator = GetPathSeparator() oPathSettings = CreateUnoService( "com.sun.star.util.PathSettings" ) aPath = convertFromUrl( oPathSettings.Work ) if right(aPath,1) <> aSeparator then aPath = aPath & aSeparator aFile = convertToUrl( aPath & "resultats.csv" ) dim fileProperties(1) as new com.sun.star.beans.PropertyValue fileProperties(0).Name = "FilterName" fileProperties(0).Value = "Text - txt - csv (StarCalc)" fileProperties(1).Name = "FilterOptions" fileProperties(1).Value = "59,34,ANSI,1" StarDesktop.loadComponentFromUrl( aFile,"_default",0,fileProperties() ) oDoc = ThisComponent wait 5000 '5 sec. if oDoc.IsModified then msgbox "Attention document modifié",48, "Bye, bye" REM ### prevoir sauvegarde else oDoc.Dispose() StarDesktop.loadComponentFromUrl( aFile,"_default",0,fileProperties() ) end if end sub