Excel ouvrire un fichier word
Résolu/Fermé
A voir également:
- Excel ouvrire un fichier word
- Fichier rar - Guide
- Word et excel gratuit - Guide
- Comment ouvrir un fichier epub ? - Guide
- Comment réduire la taille d'un fichier - Guide
- Liste déroulante excel - Guide
2 réponses
Bonsoir,
Après avoir référencé la bibliothèque :
Microsoft Word 12 Object Library dans outils / références
Saisie le code suivant :
dans la partie Général / déclarations :
Option Explicit
'Déclaration des variables
Dim wApp As Word.Application
Dim wDoc As Word.Document
créer une nouvelle procédure de type SUB :
Public Sub Ouverture_Fichier()
Set wApp = CreateObject("Word.Application")
wApp.Visible = True
'set wdoc=wapp.Documents.Open "<chemin d'access + nom du fichier>"
' autres instructions ...
End Sub
Après avoir référencé la bibliothèque :
Microsoft Word 12 Object Library dans outils / références
Saisie le code suivant :
dans la partie Général / déclarations :
Option Explicit
'Déclaration des variables
Dim wApp As Word.Application
Dim wDoc As Word.Document
créer une nouvelle procédure de type SUB :
Public Sub Ouverture_Fichier()
Set wApp = CreateObject("Word.Application")
wApp.Visible = True
'set wdoc=wapp.Documents.Open "<chemin d'access + nom du fichier>"
' autres instructions ...
End Sub