Hello again, I have attached the source code, with comments. The scenario is the following: users can create doc templates themselves, stored into the database. This templates could be (at the users choise):
-
with some predefined mergefields and without header & footer; in this case the header&footer is copy from a template stored into the database, at a department level, or organization level;
-
with some predefined mergefields and withs own header & footer; in this case there is no need to copy the header&footer.
The header & footer could also have some mergefields (compartment/organization address, phone, fax etc).
The problem is that for some header&footer (like the last one I have sent to you) the operation doesn’t go well, the resulting document is not well formed, and could not be open with word. But if I replase the images in the header&footer with a small one, it works. Maybe is something related to the images, I don’t know.
Anothe question: wich is the maximum number of mergefields/document? There is a limit? I want to offer the users a list of predefined fields names they could use in their templates.
Tnank you very much!