We are developing a VB program and we need to create brochures and letters based on a .dot templates. That is the best way we can think of doing it because up to now we were creating them by creating a htm document first and then copying the content into a word document. However, we had no control over margin width, page breaks, headers and footers and we need to have control over these. It needs to work like a mail merge, i.e. it needs to put in the name and address fields and any other fields that are necessary including images and tables etc.
the system that we are using at present would be adequate if we could determine the layout of the .doc that it copies the content of the html document into (i.e. if we could choose the .dot that it uses for the layout of the .doc for page setup margins header footers etc.).
here is a sample of the code where we copy the content of the html document into the word document.
Set fsoStream = [url removed, login to view](Reportspath & "" & DocNewPath & ".html", True)
[url removed, login to view] sContents
[url removed, login to view]
DocName = Reportspath & "" & DocNewPath & ".html"
FileCopy DocName, Reportspath & "" & DocNewPath & ".doc"
Kill Reportspath & "" & DocNewPath & ".html"
if you are able to do this project can you please send us an example program that does this.