Word 2003 Automation - Design Question

N

Nice Chap

One of the short comings of the earlier versions of Word was we could NOT
use Word for server side automation to create documents. Does Word2003
support Server side automation ? or is there any server side component that
allows us to create documents using WordML ?
 
E

Eric Lawrence [MSFT]

One of the short comings of the earlier versions of Word was we could NOT
use Word for server side automation to create documents. Does Word2003
support Server side automation ? or is there any server side component that
allows us to create documents using WordML ?

To be clear, it is ~possible~, but not supported to use Office for
server-side automation. That remains the case for Office 2003.

Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Tom

If MS Office is not supported for server side automation,
are there other products available (perhaps from 3rd
parties) that could support this? How have others
automated the processing of word documents on servers?
 
J

Jonathan West

Tom said:
If MS Office is not supported for server side automation,
are there other products available (perhaps from 3rd
parties) that could support this? How have others
automated the processing of word documents on servers?

Well, there are any number of controls etc which can generate HTML, RTF or
XML, which can be read by Word.

If you *must* use the native binary file format, then your options are
rather more limited. One option that might be attractive is to use
dsofile.dll, which is a free download from the MS website. dsofile.dll can
only read and write document properties, but that might be enough for your
purposes. In Word, you can insert DOCPROPERTY fields within the document
which will display the contents of properties you set using dsofile.

That way, you could have a standard layout, with specific content which is
set as needed.

The following article includes a link to a Word template that has some code
for reading doc properties using dsofile. It also has a link to the location
on the MS site where you can download dsofile. The download includes a
sample VB6 app demonstrating reading and writing properties.
 
J

Jacek

Hi Eric!

I would appreciate if You would be more specific on explaining term
"~possible~, but not supported".
Does it mean that Office provides server-side automation services but MSFT
does not release any API info on that, or rather that it is not accessible
at all?

Jacek
 
J

Jonathan West

Jacek said:
Hi Eric!

I would appreciate if You would be more specific on explaining term
"~possible~, but not supported".
Does it mean that Office provides server-side automation services but MSFT
does not release any API info on that, or rather that it is not accessible
at all?

You can see more details in this KB article

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=257757

In brief the issues are

- Office always runs under a user accountm even when started through
automation from a system process
- There is no way to stop the UI getting generated
- Office is big and often doesn't appreciate multiple instances being
started
- Some errors & problem result in message boxes being displayed, stopping
the app until the user clears it
- Security for Office hasn't been designed with server-side applications in
mind
- The EULA doesn't permit server-side usage unless the clients being served
all have their own copy of Office.

Apart from that, you'll have no problems.

Although I haven't attempted server-side automation of Office, I have
written some long-running document processing macros in Word, and it is
seriously hard work sometimes to ensure that for those wrning dialogs that
can't be suppressed, the code is written to ensure that they are never
triggered. It can be done, but it is tricky.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top