Results 1 to 4 of 4

Thread: [FAQ's: OD] Why do I get an Outlook Security Prompt?

Threaded View

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    [FAQ's: OD] Why do I get an Outlook Security Prompt?

    Starting with Outlook 2000 Service Pack 3 Microsoft has added the infamous "Security Prompt" when a program is trying to access or automate certain areas/features of Outlook. This is to help protect you from attacks by virus'.

    There are a couple of types of security prompts. One is just when your automating it notifies you that a program is attempting to access Outlook email addresses (Fig. 1). A second is when your attempting to access Outlook Data (Fig. 2). And lastly, a third is when you are programmatically trying to send an email and it makes you wait a few seconds before it enables the Yes/No buttons on the prompt. (Fig. 3)

    Fig. 1



    Fig. 2



    Fig. 3






    For the first two types you will need to check the "Allow access for" checkbox (Fig. 4) and then select a time duration to allow (Fig. 5).

    Fig. 4



    Fig. 5




    Here is a chart on the property, functions, and methods that are protected by the Security Prompt:

    Items marked with an asterisk (*) are new for Outlook 2003.

    Code:
    Object          |  Restricted Properties          |  Restricted Methods
    -----------------------------------------------------------------------
    Action          |                                 |  Execute
    
    AddressEntries  |  Any property                   |  Any method
    
    AddressEntry    |  Any property                   |  Any method
    
    AppointmentItem |  Body*                          |  Respond
    AppointmentItem |  Organizer                      |  SaveAs
    AppointmentItem |  RequiredAttendees              |  Send
    AppointmentItem |  OptionalAttendees              |
    AppointmentItem |  Resources                      |
    AppointmentItem |  NetMeetingOrganizerAlias       |
    
    ContactItem     |  Body*                          |  SaveAs
    ContactItem     |  Email1Address                  |
    ContactItem     |  Email1AddressType              |
    ContactItem     |  Email1DisplayName              |
    ContactItem     |  Email1EntryID                  |
    ContactItem     |  Email2Address                  |
    ContactItem     |  Email2AddressType              |
    ContactItem     |  Email2DisplayName              |
    ContactItem     |  Email2EntryID                  |
    ContactItem     |  Email3Address                  |
    ContactItem     |  Email3AddressType              |
    ContactItem     |  Email3DisplayName              |
    ContactItem     |  Email3EntryID                  |
    ContactItem     |  IMAddress*                     |
    ContactItem     |  NetMeetingAlias                |
    ContactItem     |  ReferredBy                     |
    
    DistListItem    |  Body*                          |  GetMember
    DistListItem    |                                 |  SaveAs
    
    Inspector       |  HTMLEditor*                    |
    Inspector       |  WordEditor*                    |
    
    ItemProperties  |  Any restricted property        |
    
    JournalItem     |  Body*                          |  SaveAs
    JournalItem     |  Contactnames                   |
    
    MailItem        |  Body*                          |  SaveAs
    MailItem        |  HTLMBody*                      |  Send
    MailItem        |  SenderEmailAddress*            |
    MailItem        |  SenderEmailType*               |
    MailItem        |  SenderName                     |
    MailItem        |  SentOnBehalfOfName             |
    MailItem        |  ReceivedByName                 |
    MailItem        |  ReceivedOnBehalfOfName         |
    MailItem        |  ReplyRecipientNames            |
    MailItem        |  To                             |
    MailItem        |  Cc                             |
    MailItem        |  Bcc                            |
    
    MeetingItem     |  Body*                          |  SaveAs
    MeetingItem     |  SenderName                     |
    
    Namespace       |  CurrentUser                    |
    Namespace       |  GetRecipientFromID             |
    
    PostItem        |  Body*                          |  SaveAs
    PostItem        |  HTMLBody*                      |
    PostItem        |  SenderName                     |
    
    Recipient       |  Any property                   |  Any method
    
    Recipients      |  Any property                   |  Any method
    
    TaskItem        |  Body*                          |  SaveAs
    TaskItem        |  ContactNames                   |  Send
    TaskItem        |  Contacts                       |
    TaskItem        |  Delegator                      |
    TaskItem        |  Owner                          |
    TaskItem        |  StatusUpdateRecipients         |
    TaskItem        |  StatusOnCompletionRecipients   |
    
    UserProperties  |                                 |  Find
    
    UserProperty    |  Formula                        |

    If your writting code in Outlooks VBA IDE then you can avoid the security prompt by using the default Application object and handling your code with that instance. As soon as you create a secondary New instance, or are automating Outlook from another language like VB 6, VB.NET or C#, you will invoke the security prompt.

    To get around this, you could just make sure to use only the default VBA instance, create a Trusted Outlook COM Add-In, use a third-party utility or set your app as Trusted in the Exchange Administration Contro Panel (if your running Outlook in an Exchange environment).
    Last edited by RobDog888; May 24th, 2006 at 10:16 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width