Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Insert table into template using Word Automation
Versions des environnements
Network:
Windows 2003 Server
I am attempting to insert a table into the middle of a Word document created from a template under automation. The template has bookmarks where multiple data elements and expressions are merged. One of these bookmarks calls method code that creates the table. The table itself has only 2 columns but may easily stretch over several pages since it includes a memo field and multiple records. The table should replace the bookmark, stretching as far as necessary, and be followed by the final paragraph in the template and the company's normal signature lines. In my tests, the table routinely obliterates everything that should follow. Is this task possible? If so, how do I define the Range for the table?
The method code to create the table is based upon Tamar Granor's example in Microsoft Office Automation with Visual FoxPro. I’ve adapted and used it many times (thank you Tamar!) However, this table is a bit more complicated since it merges so much data and appears in the middle of a template. The same information has been available in a VFP report for 25+ years but now they want it in Word.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement