This post is a response to a question I posted on an MS Forum. I have asked Dave if I can place the answer here as it requires a workbook and there is no facility to post a workbook on the MS Forum.
Although the question relates to html files produced by MS Publisher the workbook may of use to others who wish to insert text in a text file.
If you have arrived here from the MS Forum then enjoy this excellent forum!
Quote from "a9192Shark summary of discussion on MS Forum"Using MS Publisher it is not possible to enter an HTML code fragment into a header. If you need code in teh file then sometimes you can post it in the body, but some code must be in the header. The only way to do this is to open the html file and copy and paste each time. However this becomes very frustrating if you keep rebuilding the files.
The attached workbook will allow the user to search through html files and insert text after specified text. This has been used with success on my (Alan Forster) web pages. I may improve the workbook over time as I require and will post different versions.
Note that the workbook was developed for my specific purpose and is very 'quick and dirty'. It may require some modification for your purpose, it is therefore provided without warranty!
Good luck and I hope that this helps,
A.