Closing Word Editor Window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created an Outlook add-in using VB6 and have run into an issue with
users using Word as their editor. I've hooked into the "Application.ItemSend"
event to check the outgoing email against some criteria. There is a section
of my code that will cancel the original email send and close the editor
window:

Cancel = True
Call oApp.ActiveInspector.Close(olDiscard)

The code runs fine if the user is using the regular Outlook editor but if
they've set the editor to be Word, the editor screen says open.

How do I send the Word window the close command?

Thanks.
 
Just an update for my previous message, I'm getting the error specifically at
the line:

Call oApp.ActiveInspector.Close(olDiscard)
 
Back
Top