Bonjour,

Je voudrais:
- Ouvrir un document Word
- afficher l'apercue d'impression
- fermer l'apercue une fois le document imprimer par l'utilisateur

les deux premières étapes, c'est ok. Par contre, impossible de coder la dernière. Est ce possible ?
Si oui, pouvez vous m'aidez ^^!
Merci =)

Voici mon code pour l'instant:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Imports Word = Microsoft.Office.Interop.Word
 
...
...
 
 Public Sub PrintWord(ByVal WORD_NAME As String, ByVal Visible As Boolean)
 
        If My.Computer.FileSystem.FileExists(WORD_NAME) Then ' Verifie si le fichier xls existe
            Dim InstanceWord As New Word.Application
            Dim Fichier As New Word.Document
            Fichier = InstanceWord.Application.Documents.Open(WORD_NAME)
            InstanceWord.Visible = True
            Fichier.PrintPreview()
        Else
            MessageBox.Show("File does not find !", "Error Open Word", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End If
 
    End Sub