2 Replies Latest reply: Apr 13, 2015 4:24 PM by Vladimir Komarov RSS

    Paste Clipboard (Table) into NOTEPAD

      Does anybody know how to paste a table which is in the ClipBoard into a NOTEPAD file using vbscript. The code i'm trying to get is something like this

       

      SUB Email349Archivo ()
      'We Set the File Path
       Set oShell = CreateObject("WScript.Shell") 
       Set fso = CreateObject("Scripting.FileSystemObject")
       strFilePath = oShell.CurrentDirectory & "\349.TXT"
      'We copy the Table 
      Set obj = ActiveDocument.GetSheetObject("CH166")
       obj.CopytableToClipboard  TRUE
      
      Dim Value 
      Set myFSO = CreateObject("Scripting.FileSystemObject")
      Set objTextFile = myFSO.CreateTextFile(strFilePath, True)
      
      What must I do here? 
      
       objTextFile.Close
      SET objTextFile = NOTHING
      SET myFSO = NOTHING
      SET obj = NOTHING
      
      END SUB