PC Review


Reply
Thread Tools Rate Thread

How to avoid secure warning dialog box?(Some ex. in MSDN Doesn't w

 
 
=?Utf-8?B?RGF2aWQgWmh1?=
Guest
Posts: n/a
 
      2nd Jun 2005
I'm programming a COM Add-in for outlook2003. UnFortunately, the warning
dialog box always popes up what I tries to save a sent mail item
programmally.like this:

'**********************************************
Dim olApp As Outlook.Application
Dim objMailItem As Outlook.MailItem
Set olApp = Application
Set objMailItem = olApp.Session.GetDefaultFolder(olFolderSentMail).Items(1)
Call SaveMailItemAsFile(objMailItem, sFullPath)
'***********************************************

So I researched MSDN and found an example of article "What's New in
Microsoft Office Outlook 2003 for Developers?", which said that would avoid
secure warning dialog box:

Sub TrustedCode()
Dim olApp As Outlook.Application
Set olApp = Application
Dim oMail As Outlook.MailItem
Set oMail = _
olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)
MsgBox oMail.SenderEmailAddress, vbInformation
End Sub

But it doesn't work, in fact. How could I do?Somebody helps me.


 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      2nd Jun 2005
All your objects need to derive from the Application object passed by the OnConnection event. Also, if you are connection to Exchange and have the CheckAdminSettings registry value set to anything other than 0, then Exchange administrator will need to set up a security settings item that trusts your add-in. See http://www.outlookcode.com/d/sec.htm
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"David Zhu" <(E-Mail Removed)> wrote in message news7131077-4DBE-4BAB-9162-(E-Mail Removed)...
> I'm programming a COM Add-in for outlook2003. UnFortunately, the warning
> dialog box always popes up what I tries to save a sent mail item
> programmally.like this:
>
> '**********************************************
> Dim olApp As Outlook.Application
> Dim objMailItem As Outlook.MailItem
> Set olApp = Application
> Set objMailItem = olApp.Session.GetDefaultFolder(olFolderSentMail).Items(1)
> Call SaveMailItemAsFile(objMailItem, sFullPath)
> '***********************************************
>
> So I researched MSDN and found an example of article "What's New in
> Microsoft Office Outlook 2003 for Developers?", which said that would avoid
> secure warning dialog box:
>
> Sub TrustedCode()
> Dim olApp As Outlook.Application
> Set olApp = Application
> Dim oMail As Outlook.MailItem
> Set oMail = _
> olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)
> MsgBox oMail.SenderEmailAddress, vbInformation
> End Sub
>
> But it doesn't work, in fact. How could I do?Somebody helps me.
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to avoid warning pop-up dialog boxes Andrew Microsoft Excel Programming 3 23rd May 2008 08:56 PM
how to avoid security warning about secure and unsecure items when browsing a https://-page =?Utf-8?B?bWltZTAwMDk=?= Windows XP Internet Explorer 1 18th Mar 2004 03:02 PM
how to avoid macro warning dialog box???? =?Utf-8?B?cHJvYmxlbQ==?= Microsoft Excel Worksheet Functions 5 26th Feb 2004 05:40 AM
MSDN AES Sample Secure? I don't see it. Donald Adams Microsoft Dot NET Framework Forms 1 27th Jan 2004 05:09 AM
Prompt when not secure data on secure site WHY and how to avoid it? Gilbert Baron Windows XP Internet Explorer 3 11th Jan 2004 03:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:05 PM.