![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#5
|
|||
|
|||
![]()
olInspector is one of the OlObjectClass enums, you cannot have a varable
with that name. Secondly, change the code to the following (notice Inspectors.Item) Set Inspector = Application.Inspectors.Item(1) Inspector.Close(olDiscard) -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Synced" wrote in message ... I can't even do the following for example: Dim olInspector as Inspector Set olInspector = Application.Inspectors(1) olInspector.Close(olDiscard) I get the 287 error. I also get the 287 error if I try to close a MailItem in the CommandBarButton Click event. Any ideas what I am doing wrong? Is error 287 always related to security? Like I said in the other post. I thought code security was supposed to prompt when security is becoming an issue. I'm not getting any prompts, just error 287 exceptions. Thanks again in advance for all the help. "Dmitry Streblechenko" wrote: What is teh relevant snippet off your code? When exactly is your code executed (a particular event handler etc)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Synced" wrote in message ... Hey gang. Fairly new to automating office/outlook. I am working on a COM add-in written in VB6. I am getting an error 287 when trying to do a Close() call on an Inspector or MailItem. I did a bunch of read up and this seems to be related to the security features in office however my Application object does say it is trusted so why am I hitting this issue? So how do I work around this? Am I doing something wrong? Any help would be greatly appreciated. Thanks! . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiler warning CS0467 for Inspector.Close | Lucy | Outlook - Using Forms | 2 | September 2nd 08 12:05 AM |
Inspector wrapper and Inspector close not fireing | [email protected] | Add-ins for Outlook | 1 | June 20th 08 01:53 PM |
Inspector Close events not firing.. | Sanjay | Add-ins for Outlook | 1 | May 22nd 06 06:18 PM |
Help! Inspector.Close is fired before Inspector.Activate handler finishes | Sergey Anchipolevsky | Add-ins for Outlook | 8 | February 9th 06 09:51 AM |
Outlook 2003 fires an Inspector Close when a send is cancelled | Steve D | Add-ins for Outlook | 8 | February 8th 06 11:22 PM |