BigJimSlade
Registered User.
- Local time
- Today, 03:05
- Joined
- Oct 11, 2000
- Messages
- 173
Hi, Big Jim here:
I will try and consolidate my code...
*************************************************
Set w = New Word.Application
Set newdoc = w.Documents.Open("D:\Blank.doc")
Do Until rsta.EOF
Set doc = w.Documents.Open("D:\WD_BreakPage.doc")
doc.Activate
doc.Select
Selection.Copy
newdoc.Activate
Selection.Paste
doc.Save
doc.Close
Set doc = Nothing
End If
rsta.movenext
Loop
newdoc.SaveAs ("D:\" & strFileName)
newdoc.Close wdDoNotSaveChanges
Set newdoc = nothing
w.quit
set w = nothing
************************************************
When I run this code to paste hundreds of individual documents into one master file (this is not exactly what I am doing, but I have cropped the code), after I close each document that was pasted, a temp file (ie "~$Word.doc") stays open. Eventually, I run out of system resources. Any thoughts?
Thanks in advace!
Big Jim
I will try and consolidate my code...
*************************************************
Set w = New Word.Application
Set newdoc = w.Documents.Open("D:\Blank.doc")
Do Until rsta.EOF
Set doc = w.Documents.Open("D:\WD_BreakPage.doc")
doc.Activate
doc.Select
Selection.Copy
newdoc.Activate
Selection.Paste
doc.Save
doc.Close
Set doc = Nothing
End If
rsta.movenext
Loop
newdoc.SaveAs ("D:\" & strFileName)
newdoc.Close wdDoNotSaveChanges
Set newdoc = nothing
w.quit
set w = nothing
************************************************
When I run this code to paste hundreds of individual documents into one master file (this is not exactly what I am doing, but I have cropped the code), after I close each document that was pasted, a temp file (ie "~$Word.doc") stays open. Eventually, I run out of system resources. Any thoughts?
Thanks in advace!
Big Jim