Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Appending to File
I've got a large macro which reads an input file, massages it in various
ways, and then writes multiple output files. Here is the code that writes the output files. The key point is that already existing copies of the files are simply overwritten. ' Upon reaching the end of the input file, activate each of the output document files ' in turn and write them out. If EOF(1) Then Close #1 'Set MyOpen = Nothing 'iOpen = 0 'GoTo again: For i = 0 To iNoFiles Windows(sFileName(i)).Activate ActiveDocument.SaveAs FileName:=sFileName(i), fileformat:=wdFormatText ActiveDocument.Close ' close the document after saving it Next End End If I would like to be able to append instead of overwrite. IOW, there may be preexisting copies of any of the sFileName(i) files already on disk. If so, I don't want to overwrite them, I want to append the new document (in Word) to the old document (on disk). I would appreciate any tips (or code) which would guide me in how to do this. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Appending to File
Thanks for your reply, Tom!
As it happens, this VBA macro has Word origins. Getting the behavior I'm aiming at is clearly going to be more hassle than I had hoped. :^( |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
appending one Excel file to another ? | Excel Worksheet Functions | |||
Appending columns | Excel Discussion (Misc queries) | |||
Appending an Excel File to another | Excel Discussion (Misc queries) | |||
Appending a second csv file | Excel Discussion (Misc queries) | |||
Appending Excel file to an Access table | Excel Programming |