Combine Multiple Word Documents

#1
I have a Blueprism process which will generate a word file with a table of information. Each item will generate a new file. I want my process to combine each file into a combined file. Currently my process will copy the data from the individual file, but overwrites all of the data in the combined one. This means that the combined file only has the data from the last individual file. The process works from the process studio, but not from the control room (run time).
Blueprism copies the data to the clipboard
Dim d As Object = GetDocument(handle,document_name)
Dim w As Object = d.Application
Dim s As Object = w.Selection

If s IsNot Nothing Then s.Copy

d = Nothing
w = Nothing
s = Nothing
I am using this code to select the combined file once I have copied the data
Dim d As Object = GetDocument(handle,document_name)
d.Range(Start:=0, End:=0).Select
I then paste
Dim d As Object = GetDocument(handle,document_name)
Dim w As Object = d.Application

w.Selection.Paste

d = Nothing
w = Nothing
I then save and close.
 
Top