Hi =?Utf-8?B?RGFuaWVs?=,
I exit out of wordobj using below codes. But sometime word doc pops up saying
that word doc I used using this application has been recovered, etc. Do I
need to add 'wordobj = nothing' after the last line to prevent this from
happening?
WordObj.Options.PrintBackground = False
WordObj.PrintOut Copies = 1
WordObj.Application.Quit 0
You definitely should set the object to nothing, in any case.
But it's not said that this will stop that particular message. This indicates
that something else is wrong - Word is crashing for some reason.
From the little you show us of your code, I'm guessing
1. You've turned off errors (On Error REsume next?), so you aren't being
alerted when Word encounters a problem. *Don't DO that* It's dangerous, as
you're finding out. Code properly, find out why your getting errors and fix the
cause, don't try to sweep it under the rug. It will surely come back to haunt
you.
2. I think (1) because there is no Options property for a Word document (the
first line of code you show us)
3. You need to declare an object variable for the Word.Application and use
it properly.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail