Ouvrir un .txt GALERE

Résolu
c_charly Messages postés 21 Date d'inscription lundi 27 juin 2005 Statut Membre Dernière intervention 8 septembre 2005 - 31 août 2005 à 16:18
c_charly Messages postés 21 Date d'inscription lundi 27 juin 2005 Statut Membre Dernière intervention 8 septembre 2005 - 31 août 2005 à 17:03
Bonjour,
je developpe un proj en vb et j'aimerai ouvrir le fichier se trouvant a l'adresse c:\DossierPoint\idmag.txt" .
J'ai essaye d'utiliser la commande shell mais je n'arrive tjrs pas a l'ouvrir
ouverturefichier = Shell("notepad" & App.Path & "\DossierPoint" & idmag.txt)
ou encore : .
ouverturefichier = Shell("notepad" & "c:\DossierPoint\idmag.txt")

SVP AIDEZ MOI
merci davance

3 réponses

Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
31 août 2005 à 16:43
il doit te manquer un blanc entre notepad et c:\Dossier



Shell("notepad" & " c:\DossierPoint\idmag.txt"), vbNormalFocus








Daniel
3
cs_Tipo Messages postés 82 Date d'inscription dimanche 2 novembre 2003 Statut Membre Dernière intervention 13 avril 2017 1
31 août 2005 à 16:37
Hello,

Dans les déclarations :

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1

Pour ouvrir ton fichier :

ShellExecute hwnd, "Open", App.Path & "\DossierPoint\idmag.txt", "", App.Path, 1
0
c_charly Messages postés 21 Date d'inscription lundi 27 juin 2005 Statut Membre Dernière intervention 8 septembre 2005
31 août 2005 à 17:03
MERCI bcp ct bien l'espace qui manquait entre les deux .... ce foutu: " " :D enfin merci encore Gobillot
0
Rejoignez-nous