Click to See Complete Forum and Search --> : get rid of process?
Winla
Jan 12th, 2000, 01:15 AM
I got somehow similar problem with word doc. printing. A msg. shows up asking if you want to quit the word without printing. So I put a couple of seconds time delay before the word quits and it worked fine. The problem is that printing a doc. or saving a file takes time and the processing doesn't wait.
There might be a better way to avoid this.
badgers
Jan 12th, 2000, 11:32 AM
Dim Hard As Word.Application
Set Hard = New Word.Application
Hard.Documents.Open "c:\ed_cs.rtf"
Hard.ActiveDocument.SaveAs "c:\ed_cs.txt", wdFormatDOSTextLineBreaks
Hard.Quit
Set Hard = Nothing
this code opens word and then gets word to save the file with linebreaks. This code is in a command button's click event.
If I check the task manager their is still a process called winword.exe running.
how do I get this code to remove itself from memory and get rid of the process.
It is a problem because I get an error the next time the button is clicked.
------------------
I am so skeptacle, I can hardly believe it!
This example shows you how to open word and load a word document. and how you close your document and close word application.
Dim objWordApp As Object
Set objWordApp = GetObject("", "Word.Application.8")
If objWordApp Is Nothing Then
Set objWordApp = CreateObject("Word.Application.8")
End If
objWordApp.Documents.Open FileName:="C:\MyWord.Doc"
objWordApp.Documents(1).SaveAs "c:\finish.Doc"
objWordApp.Documents(1).Close
objWordApp.Quit
Clunietp
Jan 12th, 2000, 11:47 AM
Examples of early binding w/ MS Word:
http://www.vb-world.net/ubb/Forum1/HTML/012330.html
http://www.vb-world.net/ubb/Forum1/HTML/012578.html
print message box problem apparently resolved in link #2
[This message has been edited by Clunietp (edited 01-13-2000).]
badgers
Jan 12th, 2000, 11:53 AM
it is my understanding that your example uses late binding.
I am trying to use early binding for this project. I understand and have used your method before. I would like to thank you for your time and help. Do you have an example using early binding?
thank you for your time and have a good day
------------------
I am so skeptacle, I can hardly believe it!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.