> Subject: Re: What is wrong with this code
> From: "Chadwick DeVoss" <chad@d...>
> Date: Mon, 28 Jan 2002 16:15:47
> X-Message-Number: 18
>
> maybe try the GetObject method
>
> Set objWord = GetObject("c:\temp\r.doc", "Word.Application")
>
>
Thanks. I will try this. However, I understand that get method is used if instance of the application is open and create if it is to
be opened. Love to hear
your comments.
Pepe
> > Hi EveryOne,
> >
> > I have this code in ASP, which is supposed to open a word document and
> save it
> > as html document. I am trying to use this to convert word document to
> html in
> > batch mode.
> >
> > At times the code opens the word document and converts it to html. All
> this is
> > done without word or html documents being visible. At other times it
> just sits
> > there and nothing happens. The IE seems to stay put.
> >
> > Here is the code in question. Any suggestion of help is appreciated.
> >
> > <%
> > Const wdFormatHTML = 8
> >
> > Dim objWord
> >
> > Set objWord = CreateObject("Word.Application")
> > objWord.Documents.Open "c:\temp\r.doc"
> > objWord.ActiveDocument.SaveAs "c:\temp\R.html", wdFormatHTML
> >
> > objWord.ActiveDocument.Close
> > objWord.Quit '<============== Important!!!
> > Set objWord = Nothing
> >
> > %>