Disable Winword error message in VB

D

david

Hi,

Following code in a VB-COM use Winword to print out a
document. But Winword will rise an error message if
something is wrong in the document. I don't want the error
message, since no body is waiting for clicking that OK
button. Is it possible to disable that error message from
Winword? Thanks.

Set m_objNewDoc = m_objMSWord.Documents.Open
(v_strInWordDoc, False, True)
Set m_objMSWordDialog = m_objMSWord.Dialogs(97)
m_objMSWordDialog.Printer = m_DC.NewPrinterName
m_objMSWordDialog.DoNotSetAsSysDefault = 1
m_objMSWordDialog.Execute
m_objNewDoc.PrintOut False 'Error rised here ...
m_objNewDoc.Close False
 

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

Top