VB Script to copy data from one file and insert into another
I have this code that will open a file, but now I want to copy what is in the file, and paste it into file2. So for example the below code will open file1, but now I want to copy the data in file1 and paste it (anywhere) into file2...
How can this be achieved?
Code:
Sub OpenDocument()
Dim strDocument As String, strExecutable As String
strDocument = Application.GetOpenFilename("All Files,*.*", 1, "Open File", , False)
If Len(strDocument) < 6 Then Exit Sub
strExecutable = GetExecutablePath("lar")
If Len(strExecutable) > 0 Then
Shell strExecutable & " " & strDocument, vbMaximizedFocus
End If
End Sub