problems with word object in vb program
Hi guys,
i am trying to create a word object in vb program and save it as .html and then close it..all in non-visual mode...but after saveas is done, when i try to call wdoc.close where wdoc is derived from Word.Application.Documents.Open(..)..the runtime is complaining that the the "property is not available as a document window is not active.." ...
I am java programmer and donno what the hell is this message about...
Any help is appreciate...urgent..
Thanks
Re: problems with word object in vb program
I'm no VBA guru, but try re-setting your document object after you finish your .SaveAs command,
use the .activedocuments
There might be a problem with the .Open part also.. I always used the .Activedocument command.
i.e.
set mydoc = wordapp.activedocuments
' write stuff routine
mydoc.SaveAs..blah blah
set mydoc = wordapp.activedocuments
mydoc.close
Hope This helps