Tyra3l
Messages postés3Date d'inscriptionmercredi 28 mai 2008StatutMembreDernière intervention31 décembre 2009
-
28 mai 2008 à 11:09
Tyra3l
Messages postés3Date d'inscriptionmercredi 28 mai 2008StatutMembreDernière intervention31 décembre 2009
-
28 mai 2008 à 15:42
Bonjour amis programmeurs,
je suis actuellement en stage en allemagne dans le cadre de ma formation (BTS IRIS) et on me demande de faire une petite chose :
Tout d'abord d'utiliser Joomla pour faire une page web dynamique,
ensuite à l'aide d'un clic sur une image d'ouvrir automatiquement un logiciel
(word, excel,... selon le type de fichier à lire) et d'y ouvrir le fichier joint à l'article.
J'ai donc un petit scipt VBS pour cela :
<!-- BEGIN TEMPLATE: bbcode_code -->
Code :
<script language=VBScript>
<!--
function load_word(mode, pfad)'mode 0 normal open'mode 1 open as dotSet appWord = CreateObject("Word.Application")' Display the application.
appWord.Visible = TRUE
'Open the document.'mode 1 dot file 0 docfileif mode = 1then appWord.Documents.Add(pfad)endifif mode = 0then appWord.Documents.Open(pfad)endif' Close the object variable.Set appWord = Nothingendfunction
function load_excel(pfad)Set appExcel = CreateObject("Excel.Application")' Display the application.
appExcel.Visible = TRUE'Open the document.
appExcel.Workbooks.Open(pfad)' Close the object variable.Set appExcel = Nothingendfunction
function load_powerpoint (pfad)Set appPowerpoint = CreateObject("Powerpoint.Application")' Display the application.
appPowerpoint.Visible = TRUE'Open the document.
appPowerpoint.presentations.Open(pfad)' Close the object variable.Set appPowerpoint = Nothingendfunction
<!-- END TEMPLATE: bbcode_code -->Ce script fonctionne très bien lorsque je l'ouvre avec Notepad++, mais avec Joomla, étrangement, ca ne fonctionne plus, mon image est bien présente mais lorsque je clic dessus word ne s'ouvre pas, contrqirement à mes tests avec notepad++.
Cela fait maintenant plusieurs heures que je me prends la tête dessus en vain.