A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Setting Security Features of Outlook (IsTrusted)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 31st 08, 03:12 AM posted to microsoft.public.access.formscoding,microsoft.public.office.developer.outlook.vba,microsoft.public.office.developer.vba,microsoft.public.outlook.program_vba
Don
external usenet poster
 
Posts: 8
Default Setting Security Features of Outlook (IsTrusted)

Does anyone know how to manage security settings of Outlook to allow code in
MS Access to use objects in Outlook?

We are using Office 2007 in a corporate environment. Trust Center in
Outlook appears to be set to allow programmatic execution from an
application outside of Outlook. The radio button is set to warn if the
anti-virus is out of date or invalid. (The selection is greyed out since as
a regular user I am not allowed to change it.) And it says the AV is valid
(Symantec Corporate edition)

However, when I execute the code, objRecip.Application.IsTrusted is set to
FALSE -- this is troubling since the trust center implies that the code
should execute. The way I read the manual
(http://msdn.microsoft.com/en-us/library/bb207708.aspx) Outlook will not
trust the object and presumably therefore not allow it to be set.

How can I go about making my MS Access VBA code trusted in Outlook? I
realize the security features in Outlook are there to prevent malcontents
from using viruses to grab Outlook. But there has to be a way for
legitimate users to call Outlook from Access (or Word, etc).

Suggestions? Thoughts?

Thanks!

Don




Here is the code sample:

Public Sub ProblemDemo2()
Dim oNS As Outlook.NameSpace
Dim objRecip As Outlook.Recipient
Dim objDist As Outlook.DistListItem
Dim RecipTrust As Boolean

' Trust Center in Outlook
' Appears to be set to allow programmtic access from other applications.
' Anti-virus: Valid
' Set to warn when AV is out of date or invalid
'
' Must create connection to Outlook as this code is in MS Access
Set olApp = New Outlook.Application
Set oNS = olApp.GetNamespace("MAPI")

Set objRecip = ")
' If I look at objRecip in Locals window, it appears to be
' showing default values. Address is as is AddressEntry
' objRecip.Application.IsTrusted is set to FALSE and is a
' READONLY property.
'
RecipTrust = objRecip.Application.IsTrusted

Set objDist = olApp.CreateItem(olDistributionListItem)
objDist.DLName = "VBATest_2"
objDist.Body = "Programmtic List Build Test"

objDist.AddMember objRecip

objDist.Save
objDist.Display
End Sub



Ads
  #2  
Old July 31st 08, 02:52 PM posted to microsoft.public.access.formscoding,microsoft.public.office.developer.outlook.vba,microsoft.public.office.developer.vba,microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Setting Security Features of Outlook (IsTrusted)

What are the settings on the Macro Security tab? On the Add-ins tab is the
checkbox for Apply macro security settings to installed add-ins checked?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Don" wrote in message
...
Does anyone know how to manage security settings of Outlook to allow code
in
MS Access to use objects in Outlook?

We are using Office 2007 in a corporate environment. Trust Center in
Outlook appears to be set to allow programmatic execution from an
application outside of Outlook. The radio button is set to warn if the
anti-virus is out of date or invalid. (The selection is greyed out since
as
a regular user I am not allowed to change it.) And it says the AV is
valid
(Symantec Corporate edition)

However, when I execute the code, objRecip.Application.IsTrusted is set to
FALSE -- this is troubling since the trust center implies that the code
should execute. The way I read the manual
(http://msdn.microsoft.com/en-us/library/bb207708.aspx) Outlook will not
trust the object and presumably therefore not allow it to be set.

How can I go about making my MS Access VBA code trusted in Outlook? I
realize the security features in Outlook are there to prevent malcontents
from using viruses to grab Outlook. But there has to be a way for
legitimate users to call Outlook from Access (or Word, etc).

Suggestions? Thoughts?

Thanks!

Don




Here is the code sample:

Public Sub ProblemDemo2()
Dim oNS As Outlook.NameSpace
Dim objRecip As Outlook.Recipient
Dim objDist As Outlook.DistListItem
Dim RecipTrust As Boolean

' Trust Center in Outlook
' Appears to be set to allow programmtic access from other applications.
' Anti-virus: Valid
' Set to warn when AV is out of date or invalid
'
' Must create connection to Outlook as this code is in MS Access
Set olApp = New Outlook.Application
Set oNS = olApp.GetNamespace("MAPI")

Set objRecip = ")
' If I look at objRecip in Locals window, it appears to be
' showing default values. Address is as is AddressEntry
' objRecip.Application.IsTrusted is set to FALSE and is a
' READONLY property.
'
RecipTrust = objRecip.Application.IsTrusted

Set objDist = olApp.CreateItem(olDistributionListItem)
objDist.DLName = "VBATest_2"
objDist.Body = "Programmtic List Build Test"

objDist.AddMember objRecip

objDist.Save
objDist.Display
End Sub




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customising the Outlook Security Features Administrative Package David Outlook - Installation 3 January 23rd 08 02:06 AM
Restrict user access to Outlook features DHood Outlook - Installation 1 October 9th 06 08:56 PM
setting up the calendar security Korina Borowycz Outlook - Calandaring 3 June 1st 06 08:37 PM
OL XP enable security setting Outlook - General Queries 1 March 13th 06 10:11 AM
Outlook Security Features Administrative Package Sue Mosher [MVP-Outlook] Outlook - Using Forms 0 February 6th 06 08:09 PM


All times are GMT +1. The time now is 03:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.