in reply to Re^2: Help generating MS Word .doc file from perl
in thread Help generating MS Word .doc file from perl
What I've described is similar to what will happen with say an RTF file that WordPad generated. WinWord can read those things.
I'm not sure that I understand exactly what you mean by "dynamic". Generation of a .doc file upon a new release of a text file every week is quite a different thing than generating a .doc file that continually changes every second based say upon current weather conditions.
I have generated fancy reports in WinWord from text files before, but not completely automated. The way I did it was create a Word Macro such that I just had to open the text file in Word, then hit say CTL-R (for report) to run the Word macro and then save the resulting file...3 manual steps...took a minute for me to do. This didn't matter as I had to also prepare a management presentation about what the data meant which took hours!
Now that I think about it, this worked amazingly well! I had control of the format of the text file and that enabled me to avoid writing any WinWord BASIC macro code at all! I did it all with just keyboard macro recorder and use of a Word template file that I made...Search for X, change font to Y, assign heading numbering, let's change landscape instead of portrait mode, etc.
If you are with my thinking so far, the idea is to NOT to make a Winword doc "from scratch" using Perl to control Word. Make a template and macros that you need within Word so that you can with just a few key strokes make a fancy looking report from the text input. THEN use Perl to automate those very few commands that you can do easily by hand - it may come down to just opening Word and running a single macro. Avoid all of this detailed WinWord Visual Basic stuff to the maximum extent possible.
Anyway, that is what my thinking would be as a first approach to a fancy document. But it doesn't sound like you need a "fancy document". WinWord can open a plain text or RTF file and import if the user just clicks that it is "ok" to do that.
|
|---|