Re: Reading formfields without automation by Tony
Tony
Fri Nov 03 03:40:30 CST 2006
Hi Koen,
I appreciate your concerns but there really isn't any guaranteed way besides
using Word. Rather than creating a Word Application object you could, as a
matter of routine, first try attaching (GetObject) to an existing one - that
way you at least wouldn't exacerbate any problem. You might even find it
worthwhile to deliberately keep a single instance of Word running and to
always use that rather than ever creating a new one.
If you try to process the Word binary yourself you are completely on your
own. I have looked at them and have a rough idea how they're organised but
nowhere near enough knowledge to even begin to put together a reliable
process.
--
Enjoy,
Tony
"Koen" <Koen@discussions.microsoft.com> wrote in message
news:44949743-DD61-4B90-A8E6-6DDD3BE4F641@microsoft.com...
> What I basically wanna do:
> - Users upload a word doc in my asp.net website
> - The formfields are read by the server application and the data is sent
> to DB
>
> I also know only one manner to "process" the word form: with word
> automation
>
> My concern is not really about pricing but the fact that word automation
> may
> crash, stay open, slow other processes down, mess up the servers'
> availability,...
>
> I've done a lot of word processing with automation (VB6 and .NET interop)
> in
> the past (with really advanced mechanism to quit word whenever something
> would go wrong) and for all I know, I never got it 100% right. I don't
> want
> to access the server on remoted desktop after ten days and find 200 word
> instances running in the background if you know what I mean...
>
> I also can't delegate the word processing to another sever in this case...
>
> Thanks
>
>
> "Tony Jollans" wrote:
>
>> I'm really not sure what you're asking.
>>
>> There is only one tool with which to read data from Word formfields, and
>> that is Word itself. The format is proprietary and undocumented so any
>> other
>> solution is, at best, guessing. If you have Word the 'library' is free
>> with
>> it. If you don't have Word, you can't guarantee to read the formfields at
>> any price.
>>
>> As for automation, that generally means that the Word application is
>> controlled from code in another application rather than by a user.
>> Whether
>> you choose to automate a process depends on many factors but it is
>> ultimately your choice - as already stated you still need Word.
>>
>> --
>> Enjoy,
>> Tony
>>
>>
>> "Koen" <Koen@discussions.microsoft.com> wrote in message
>> news:6B031F6E-D187-4D6E-962B-28C334B8CED8@microsoft.com...
>> > Is it possible to read data from word formfields without using
>> > automation?
>> > Is there an alternative (free) library to use?
>> >
>>
>>
>>