REM ============================================== REM = Fichier : sauver_presse_papier_dans_word.vbs REM = Desc : Exemple automation Word, enregistrer dans un nouveau fichier Word le presse-papier (qui peut être une image) REM ============================================== 'Source : http://support.microsoft.com/kb/307216 On Error Resume Next Set oWord = GetObject(,"Word.Application") If Err.Number <> 0 Then Set oWord = CreateObject("Word.Application") oWord.Visible = True ' Add a new document. oWord.Documents.Add ' Add some text. oWord.Selection.TypeText "Capture d'écran (" & Now & ")" oWord.Selection.TypeParagraph oWord.Selection.TypeParagraph 'coller le presse-papier oWord.Selection.Paste ' Save the document. oWord.ActiveDocument.SaveAs "capture d'écran.doc" ' Quit Word. oWord.Quit ' Clear the variable from memory. Set oWord = Nothing