3 messages in org.openoffice.fr.progRe: [prog] Unable to create Content
FromSent OnAttachments
Teddy GestelFeb 22, 2007 8:00 am 
Bernard MarcellyFeb 22, 2007 12:06 pm 
emma...@fr.thalesgroup.comFeb 23, 2007 1:08 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] Unable to create ContentActions...
From:Bernard Marcelly (marc@club-internet.fr)
Date:Feb 22, 2007 12:06:56 pm
List:org.openoffice.fr.prog

Message de Teddy Gestel date 2007-02-22 17:00 :

Dim oFileAccessService, oTextOutputStream, outStream

Dim the_file

oFileAccessService = createUnoService("com.sun.star.ucb.SimpleFileAccess")

oTextOutputStream = createUnoService("com.sun.star.io.TextOutputStream")

the_file = convertToURL(sChem)

outStream = oFileAccessService.openFileWrite(the_file)

Quand j’execute ce code, à la dernière ligne oFileAccessService.openFileWrite(the_file) , j’ai le message :

Runtime Error BASIC

Exception

Type : com.sun.star.ucb.ContentCreationException

Message: Unable to create Content

Or le fichier existe bel et bien.

Le codage indiqué est correct. Voir si le programme a les droits d'écriture sur le fichier ou le répertoire. Tester avec une autre adresse.

Bonne soirée Bernard