Toon posts:

JAVA - worddocument openen

Pagina: 1
Acties:

Verwijderd

Topicstarter
Wat doe ik mis?

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
public void help()
{
         try
        {
            Runtime.getRuntime().exec("cmd /c start C:\\HelpEngels.doc");

        }
        catch (IOException ioe)
        {
            JOptionPane.showMessageDialog(null, "Er is geen help-document aanwezig");
        }

}


Het document opent niet en staat op mijn c-schijf.

  • Glimi
  • Registratie: Augustus 2000
  • Niet online

Glimi

Designer Drugs

(overleden)
Hoe kan hij een textfile/doc runnen?
Je zult die file gewoon als parameter moeten meegeven aan winword hoor :)

Onzin dus :)

[ Voor 11% gewijzigd door Glimi op 13-05-2003 15:40 ]


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 10:39

Janoz

Moderator Devschuur®

!litemod

Wat gebeurt er dan wel? Niks of exception?

Kortom, wat meer info mag.

offtopic:
@glimi, probeer dat commando maar eens met een bestaand word docje ;)

[ Voor 40% gewijzigd door Janoz op 13-05-2003 15:33 ]

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


  • roelio
  • Registratie: Februari 2001
  • Niet online

roelio

fruitig, en fris.

Code werkt gewoon?

AMD Phenom II X4 // 8 GB DDR2 // SAMSUNG 830 SSD // 840 EVO SSD // Daar is Sinterklaas alweer!!


Verwijderd

Topicstarter
sorry, maar ik heb het al gevonden. Die code is wel juist om een word-document te openen, omdat hij bij exec(cmd) windows de opdracht geeft en deze weet dus dat een .doc met word moet geopend worden. De fout zat in mijn help-menu. Ik gaf idd wat te weinig info, toch bedankt voor de snelle respons.