Moundir  | Code :
 - Sub ExportPayer()
 - Call CopyExcel
 - Call PasteExcel_Sheets_P_vs_R
 - Call Doc_Payer
 - Call PrintPDF(Wd)
 - End Sub
 - Sub CopyExcel()
 - Sheets("TRS" ).Select
 - Range("A1:B45" ).Select
 - Selection.Copy
 - End Sub
 - Sub PasteExcel_Sheets_P_vs_R()
 - Sheets("P vs R" ).Select
 - Range("A1" ).Select
 - Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 - Sheets("P vs R" ).Select
 - Range("A1:B45" ).Select
 - Selection.Copy
 - Sheets("TRS" ).Activate
 - End Sub
 - Sub Doc_Payer()
 - Dim Wd As Object
 - Set Wd = New Word.Application
 - Wd.Visible = True
 - Set DocWord = Wd.Documents.Open("C:\Documents and Settings\Administrateur\Mes documents\TRS\TRS_Template.doc", ReadOnly:=True)
 - ' Fermeture de Word 'Wd.Application.Quit
 - Wd.Selection.GoTo What:=wdGoToLine, Which:=wdGoToFirst, Count:=10, Name:="" 'go to line10
 - Wd.Selection.Paste
 - 'Wd.ActiveDocument.SaveAs Filename:=Get_Path & "\" & "LCM TC TRS " & Sheets("TRS" ).Range("Bloomberg_ticker" ) & Duration & " [" & _
 - SNP & " vs " & SNR & "]" & ".doc"
 - Wd.ActiveDocument.SaveAs Filename:="C:\Documents and Settings\Administrateur\Mes documents\TRS" & "\" & "LCM TC TRS " & Sheets("TRS" ).Range("Bloomberg_ticker" ) & Duration & " [" & _
 - SNP & " vs " & SNR & "]" & ".doc"
 - End Sub
 - Sub PrintIT(Wd As Object)
 -     ActivePrinter = "Brother HL-2030 series"
 -     Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
 -         wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
 -         ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
 -         False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
 -         PrintZoomPaperHeight:=0
 - End Sub
 
  |  
 
     En gros, je veux une fonction PrintIT pouvant utiliser l'application word crée précedemment
   merci de votre aide    Message édité par Moundir le 01-09-2008 à 01:23:46
  |