"A Program trying to acess" in Outlook when using vb.net

C

Chris Thunell

I am using vb.net to access a public folder in Outlook / Exchange Server.
Whenever my program tries to access this folder i get a dialogue box saying
"A Program is trying to access Outlook. Do you want to allow access" with
Yes/No buttons and if Yes, then to allow access| for specified period in
minutes. This is precluding me from truling automating this process because
i have to be here to click the appropriate buttons. Any way to disable this
warning dialogue?

Any help would be greatly appreciated!
Chris Thunell
(e-mail address removed)

Sample code:
ol = New outlook.Application
olns = ol.getnamespace("MAPI")
olFolder = ol.activeexplorer.currentfolder
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count


For Each Itm In AllItems
'do some stuff here
Next
 
C

C-Services Holland b.v.

Chris said:
I am using vb.net to access a public folder in Outlook / Exchange Server.
Whenever my program tries to access this folder i get a dialogue box saying
"A Program is trying to access Outlook. Do you want to allow access" with
Yes/No buttons and if Yes, then to allow access| for specified period in
minutes. This is precluding me from truling automating this process because
i have to be here to click the appropriate buttons. Any way to disable this
warning dialogue?

Any help would be greatly appreciated!
Chris Thunell
(e-mail address removed)

Sample code:
ol = New outlook.Application
olns = ol.getnamespace("MAPI")
olFolder = ol.activeexplorer.currentfolder
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count


For Each Itm In AllItems
'do some stuff here
Next


Try this:
Registry: HKCU/Software/Policies/Microsoft/Security
DWORD: CheckAdminSettings
Value: 1

or

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Addins\PDFMOutlook.PDFMOutlook\
Change LoadBehavior from 3 to 0.
 
C

Chris Thunell

Neither of those options seem to work. Any other thoughts?

Chris Thunell
(e-mail address removed)
 
S

Sue Mosher [MVP-Outlook]

Try this:
Registry: HKCU/Software/Policies/Microsoft/Security
DWORD: CheckAdminSettings
Value: 1

or
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Addins\PDFMOutlook.PDFMOutlook\
Change LoadBehavior from 3 to 0.

Neither of those registry values will have any effect on the "object model guard" in your program. Setting the LoadBehavior value to 0 for PDFMOutlook just disables that add-in. It doesn't affect your application. Setting CheckAdminSettings to 1 makes Outlook look, in an Exchange environment, for a public folder that holds settings, including information on COM add-ins trusted with regard to the "object model guard," but even that will have no effect if no settings items exist.

See http://www.outlookcode.com/d/sec.htm for your options. If you're building an external program, Redemption is probably your best solution.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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