In the following code a MSWord document is created and written to in the do_wordinner routine. The code as it stands does not honour the loop command and if say I had 50 items to add to the document and am doing them 10 at a time only the first document with the first 10 items are processed. It then bypasses the LOOP command for the other documents to be created for the rest of the items.
mywordsplitamount = number of items wanted in each document
mywordsplitstart = starting number of the first record of with the item
in do_wordinner I set a filter around the mywordsplitstart and mywordsplitamount variables.
Anyone any thoughts?
Bryan
mywordsplitamount = number of items wanted in each document
mywordsplitstart = starting number of the first record of with the item
Code:
DO WHILE mywordsplitstart < = mywordsplitamount
SET MESSAGE TO ' Creating WORD document'
SELECT TEMP_9
SET FILTER TO
DO do_wordinner
mywordsplitstart = mywordsplitstart + mywordsplitamount
SELECT TEMP_9
SET FILTER TO
LOOP
ENDDO
in do_wordinner I set a filter around the mywordsplitstart and mywordsplitamount variables.
Anyone any thoughts?
Bryan