1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Dim xlApp As Object ' Déclare la variable devant
' contenir la référence.
Dim wddoc As Object
Set xlApp = CreateObject("Word.application")
' Peut-être devrez-vous attribuer la valeur True à
' la propriété Visible pour afficher
' l'application.
xlApp.Visible = True
' Utilise xlApp pour accéder aux autres objets de
' Microsoft Excel.
Set wddoc= xlApp.Documents.Open("Chemin\doc.doc")
wddoc.PrintOut 'FileName:="", Range:=wdPrintAllDocument, Item:= wdPrintDocumentWithMarkup , Copies:=1, Pages:="", PageType:= wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
wddoc.Close SaveChanges:=False |
Partager