Trusted Code Settings.

A

Ave

Hi

I was wondering if anyone could help me.

We currently have moved to outlook xp and we have a visual
basic 6 program that sends email.Since moving to outlook
xp when the visual basic program sends mail these prompt
box's appear which tell there is a program trying access
mail and you have yes no options.

I was on the microsoft site and found a security features
administrive patch which we downloaded you have a couple
of options on this you can set the security settings for
each user manually which works fine when we do it the boxs
dont pop up.But There is another option that we were
hoping to be able to use which is called Trusted code. We
have set this up as microsoft said which is to create a
DLL file and reference this DLL in the visual basic
program. You then go into the trusted code settings and
reference the DLL. We have set it up the way microsoft
said and it is not working. We have setup an ActiveXDLL in
VB6. But when the program sends mail the prompt box's
still appear.

I was wondering if someone could help me. Has someone done
this and is it working ??? Also is there anything i am
missing that your suppose to do like any other settings or
is there anything else you need to do that it does not say
on the microsoft instructions.

I would really appreciate your help !!!!

Regards
Ave.
 
K

Ken Slovak - [MVP - Outlook]

Trusted code cannot apply to a standalone program, it only applies to
Outlook COM addins written in a specific way. In a COM addin you get
an On_Connection event that passes an Application object (Outlook).
All Outlook objects in the COM addin must derive from that Application
object and you can only use Outlook object model code, not CDO code
which is never trusted. In addition, once the addin is finished you
have to install it on an admin machine and use the hash control that
is part of the security admin pack to create and store a hash result
for the addin, at that point you can trust the addin. If you recompile
the addin you have to create a new hash and re-trust.

To illustrate the instantiation of Outlook objects from the passed
Application object, it would be something like this:

'Globally available declaration
Dim WithEvents oOL As Outlook.Application
Dim WithEvents oNS As Outlook.NameSpace
'more as needed

'In the On_Connection event handler:
Set oOL = Application
Set oNS = oOL.GetNamespace("MAPI")
'etc

See the ItemsCB COM addin sample on the Resources page at
www.microeye.com for a best practices sample Outlook addin written in
VB6. And for future reference a better place to post programming
questions is the microsoft.public.outlook.program_vba newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top