Sorry, forgot to add email address and title was wrong in
last post.
Does anyone know of a successful case where office
automation is used to run Word from a service?
Microsoft say that they dont support such activity but
that doesnt mean to say it wont work. Just looking for
some support for the idea.
The problem with tryint to run Word unattended is that you have to be
*extremely* careful to avoid error messages or other dialogs. There are some
that simply cannot be suppressed, so you have to ensure that they are never
triggered. This takes lots and lots of testing, under a range of extreme
condiditions.
For instance, if a macro is building a large & complex document,
particularly one with a lot of tables in it, you are likely to get "out of
memory" messages. Word isn't actually out of memory, it has just got its
knickers in a twist. Saving the document usually allows you to carry on. But
that error message is not trappable, so if you are automating the process of
building big documents, you have to save regularly to make sure that the
dialog doesn't appear in the first place. It *can* be done, (I have created
VBA macros that take a weekend to run!) but the quality of your code and
your testing process has to be a lot higher than normal, because you are
making Word do things it isn't really designed for.