|
-
Jan 12th, 2000, 02:15 AM
#1
Thread Starter
Addicted Member
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.
-
Jan 12th, 2000, 12:32 PM
#2
Hyperactive Member
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!
-
Jan 12th, 2000, 12:47 PM
#3
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
-
Jan 12th, 2000, 12:47 PM
#4
Guru
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).]
-
Jan 12th, 2000, 12:53 PM
#5
Hyperactive Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|