Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle Err = 287 in outlook 2000

Status
Not open for further replies.

Lilyli

Programmer
Jul 27, 2004
41
US
Hello guys,
I want to save the message in Inbox folder as .msg file. I got the following warning:

"A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No". "

If I clicks no, the following error will occur:
"Run-time error '287':
Application-defined or object-defined error".

I use the following code:
On Error Resume Next
myItem.SaveAs New_Folder & "\" & fname & ".msg"

If Err = 287 Then
.........
End If
But it didn't work.

Your any help will be appreciated.
Thank you in advance!
 
Hi Lilyli
I've never done any programmming in Outlook so this is s bit of guess work!

Is the message only generated when you run your own code?
If so what would happen if you clicked YES?
Test this during a fresh session, preferably off-line

I'm guessing that by choosing NO, Outlook is terminating the potentially malicious code ie yours!

As I said, just some thoughts
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Hi Loomah,

Thank you for your replying. If I click "Yes", the program can be executed correctly. If I click "No", I will get an Error message: "Run-time error '287': Application-defined or object-defined error". If I click "Debug" button, this line: myItem.SaveAs New_Folder & "\" & fname & ".msg"
will be high lighted.

Thanks,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top