Interop saveAs html automation

B

bracoute

Hello ppl...

1)

i've finally got my automation launched correctly..
but this time i wanna know how to close my winword.exe
process which seems to remain in memory despite closing
the app... can you tell me how to 'kill' this app from
memory.

2)

can you ppl tell me how to saveas an html document
instead of just saving my word document as is... (I'm
especially looking for the code which will automate the
saving the doc to html)

Here is my code bellow.. how can i improve it?

Code:
Dim oWordApp As
Microsoft.Office.Interop.Word.ApplicationClass
oWordApp = New
Microsoft.Office.Interop.Word.ApplicationClass()

Dim oWordDoc As
Microsoft.Office.Interop.Word.Document
Dim fileName, isVisible, missing As Object
fileName = "c:\bhav\TheDoc.doc"

oWordDoc = New
Microsoft.Office.Interop.Word.Document()
oWordDoc = oWordApp.Documents.Open(fileName)

oWordDoc.Activate()

oWordApp.Selection.TypeText("Another brick in the
wall")
oWordApp.Selection.TypeParagraph()
oWordDoc.Save()
oWordApp.Quit()


From bracoute
Thanks in advance

Plz if you can, reply me via my email address:
(e-mail address removed)
 

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

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top