> is it possible to open / create word documents in word ?
eg open a document and replace text and print ? using asp and vb behind.
if so is there any tutorials anywhere ? (heh difficult searching using
google for asp / word.... !)
Yes, this is theory possible. You can do things like this:
Dim WordApp As New Word.Application
Dim WordDoc As Word.Document
Set WordDoc = WordApp.Open FileName
....do find the replace...
WordDoc.Save
This is from the top of my head and the syntax/objects are probably wrong.
The Word object model is documented in MSDN.
That said, Word (in fact no part of Office) is *not* designed to be used as
a component from an application. It does work but you may run into lots of
quirks. We had a devil of a time controlling Word remotely from our VB6
application. Most of the problems revolve around the user opening up their
own copy of WINWORD.EXE at the same time and it doing weird things with the
VB6 applications own copy of WINWORD.EXE. In effect, if you're not careful,
your app ends up sharing the same core DLLs as the user launched copy of
WINWORD. The user they closes Word and *bang* it also closes your own
internal instance....
This is with the 2000 and XP flavours. I heard that with Office 2003 they
improved the situation.
You're in a server environment though so the chances of a user opening Word
in the same session are slim.
Cheers, Rob.