I have two problems manipulating a Word document from within a VB6 application. First - the code I am using to populate cells in a loop only works reliably if an artificial delay is inserted in the loop. Second - If the table grows beyond the size of the page as rows are added, the table doesnt split accross the pages.
I have enclosed a test VB6 project and a Word Template which illustrates the two problems. The table being populated is the 4th in the document, and it needs to start (as in the example) with one row, as in the main app, that determines what data goes into which column.
First - as it is it will run fine.
If you take out the sleep command, it adds the rows but only puts some of the data in. We need to eliminate the need for the sleep command if possible as it slows the whole process down and is dependent on the speed of the machine. Is there a way of copying the whole array to the table in one go ?
Second - If you increase the intAsManyRowsAsYouWant variable so it generates more rows than will fit on the page, it puts the whole table on a second page, and when that is full carries on adding to the table without splitting it - we need a solution that splits a large table (or maybe makes copy tables), so as much as possible fits on the first page, and then it breaks the remainder over as many pages as needed.
Can you help ?
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
All versions of Windows 98 v2 and above and Word 97 and above