Hi Andy,
Sorry I have not responded sooner but I was off the grid for a while. Char(10) seems to work as you suggested and I finally got it working and tweeked the code just a bit to fit with the rest of the project. Even so I still have a few questions I hope you can help me with:
Here is the code as it stands right now:
The changes so far are minor as I just added Application.GetOpenFilename and Application.GetSaveAsFilename and changed the headers to represent what truly comes from the database. All the headers are a fixed length of six characters, spaces or numbers. In the example above I used "AB - " for the first header and "** - " for the second header. Is there any way for me to modify the code that I don't have to put down all the possibilities. The reason I ask this is because I noticed that the code will replace all the return carriages until it finds the stopping header. What I have found is that this stopping header (i.e. the next header) may be different from one file to the next.
The other question I have is when I try to save the new output file as the same name as the original file, it gives me error at this line of code:
Is there anything I can do to allow me to overwrite the original file?
Thanks for all your help.
Abousetta
Bookmarks