RE: Mail Merge Speed - Lack Of
Hi Scott,
Still I would go for the intermediate solution with a ASCII-CSV file. In this file you can provide each record with information which upon the merge process in Word can act.
The possibility to create a macro on the fly must be seen in regards that Word or Excel will not always honnor the ole statements. However it is possible to change the contents of the macro each time there are other parameters for the merge but you will keep the problem of the asynchonous behaviour. The problem is on the same level, Einstein would say.
Better is to split the whole process into little chuncks. If you have special paramaters or in your case "print yes/no" which upon the macro or whatever process has to act on provide them in a special way. I use still the old technic of the INI file. In my Word macros I read this file and do the stuff it mention. I think in your case of a twin data file, each CSV data file has its own INI file. In this case each simple and tiny step can be executed. Still you need a kind of semaphore file to tell A5 that this tiny step is ready. A5 Polls for this file and contents, a simple zero or one will suffice. Another method I use is the simple renaming of a file during the process. After the process the name is set back and the process starts again. I use this method on a network with a unique counter for Word documents. It never let me down or the network must fail ;-)
Marcel
scott penrose wrote:
-------------------------------
Thanks Marcel. In deed I use OLE and it seems they are asynchronus. I do create the ascii file already but never thought to do the majority of the process in a macro (only the merge).
There are other options that the user chooses in terms of print Yes/No, and each processed record/merge gets saved to a unique document name which is controlled by data in my database - so the macro would need to change with each record merged (in terms of the name of the document to save). I am sure this is possible using your neat method of creating a macro on the fly - I would export an ascii record, create and run the macro, and repeat for each record to be processed in the merge - although I will still have an issue in regards to whether a prior 'run' was successful before starting the next.
I have spent a lot of time on investigating options - now that it seems that A5 does not wait for an OLE instruction to complete then the game changes again - always a learning experience.
Regards,....
Hi Scott,
Still I would go for the intermediate solution with a ASCII-CSV file. In this file you can provide each record with information which upon the merge process in Word can act.
The possibility to create a macro on the fly must be seen in regards that Word or Excel will not always honnor the ole statements. However it is possible to change the contents of the macro each time there are other parameters for the merge but you will keep the problem of the asynchonous behaviour. The problem is on the same level, Einstein would say.
Better is to split the whole process into little chuncks. If you have special paramaters or in your case "print yes/no" which upon the macro or whatever process has to act on provide them in a special way. I use still the old technic of the INI file. In my Word macros I read this file and do the stuff it mention. I think in your case of a twin data file, each CSV data file has its own INI file. In this case each simple and tiny step can be executed. Still you need a kind of semaphore file to tell A5 that this tiny step is ready. A5 Polls for this file and contents, a simple zero or one will suffice. Another method I use is the simple renaming of a file during the process. After the process the name is set back and the process starts again. I use this method on a network with a unique counter for Word documents. It never let me down or the network must fail ;-)
Marcel
scott penrose wrote:
-------------------------------
Thanks Marcel. In deed I use OLE and it seems they are asynchronus. I do create the ascii file already but never thought to do the majority of the process in a macro (only the merge).
There are other options that the user chooses in terms of print Yes/No, and each processed record/merge gets saved to a unique document name which is controlled by data in my database - so the macro would need to change with each record merged (in terms of the name of the document to save). I am sure this is possible using your neat method of creating a macro on the fly - I would export an ascii record, create and run the macro, and repeat for each record to be processed in the merge - although I will still have an issue in regards to whether a prior 'run' was successful before starting the next.
I have spent a lot of time on investigating options - now that it seems that A5 does not wait for an OLE instruction to complete then the game changes again - always a learning experience.
Regards,....
Comment