I've developed VBA code in Access 2007 to copy many small Word documents into a larger Word document. It works fine, but can take 10 to 20 minutes to complete, running in the background. That's OK too! HOWEVER, because I use ".Selection.Copy" & "Selection.PasteAndFormat" as the basis for the code, it means that no other applications can use the Clipboard without conflicting with the routine running in the background.
I want to know whether there are any techniques or tools which would enable the VBA code running in the background to use some 'dedicated' Clipboard thereby freeing up any other copy and paste activities used by other applications?
My code, if it helps, looks like this:
I want to know whether there are any techniques or tools which would enable the VBA code running in the background to use some 'dedicated' Clipboard thereby freeing up any other copy and paste activities used by other applications?
My code, if it helps, looks like this:
Code:
For i = 0 to big_number
With objApp
'Open next document and copy content
strFileName = argFileNames(i)
Set docTemp = .Documents.Open(strFileName)
.Selection.wholestory
.Selection.Copy
'Switch back to Base document and paste content of current doc
.Documents(strDocBase).Activate
.Selection.endkey wdStory
.Selection.PasteAndFormat (wdPasteDefault)
docTemp.Close SaveChanges:=wdDoNotSaveChanges
End With
next i