Accessing a Word document opened by the browser

J

John

I am trying to present a Word document from a server for editing on the
client. I find I can add the document as the source (src) for an iframe in
HTML and the browser will load the document in an editable form. I would
like to retrieve the contents of the edited document for upload to the
server.

This brings up a couple of questions:

How do I access the Word document that is controlling the edit? I've
tried, without sucess::

Function clkSaveProfile
dim objWord
Set objword = GetObject(, "Word.Application")
If IsObject(objWord) then ...


And, if I can get the object, how do I access the edited text in binary
form, suitable for uploading and saving as a file on the server? I can get
the text from a Selection object but it's really the full contents of the
document as it would be written to a file that I need. How is this usually
done.

I have noticed that opening a server file will create an "mso... .doc file
in the users temp directory. Is there a way to get the full path and name
of this temporary local file? If it is not possible to get a Word document
to reveal its true contents (preferred) then I could ask a file system
object to tell me, provided I knew the name of the file.

Is there a browser object that knows some of these things?

Appreciatively, John
 
J

John

Update:

GetObject("", "Word.Application") does return the object as
objWord.Name returns "Microsoft Word". (Just needed the empty string to
chew on.), So I seem to have an object.

But ... if I say something simple like

objWord.Documents(1).Close False

I produce this error: This method or property is not available because this
document is in another application

So I haven't got the right. How do I get it? Or should I be going through a
browser object (how?)?

And, still, if I can reach the document, how can I get to its full (binary)
contents?

John
 
Top