Trying to update Exchange Public Folders From Access Form

R

rhesje

I suspect that this problem is a result of trying to use the Outlook
Object Model to update an Exchange Public Folder.

Here is what we are trying to do:

We have an Exchange Public Folder that contains contact item for
contacts that are available to all network users. This allows us to
centralize our contractors' contact info. We are currently developing
an SQL Database using Access 2003 as the front end. We are trying to
allow our users to update this contact information from a form that we
have in Access. We originally tried to use the Outlook object model to
do this and have run into a problem when trying to add a new contact
item to the Exchange Pulic Folder. We get the following error at the
"Set cItem = fldr.Items.Add(2)" line

Error # -2147467259(80004005)

You don't have permission to create an entry in the folder.
Right-click the folder, and then click Properties to check your
permissions for the folder.
See the folder owner or your administrator to change your permissions.

The permissions for the folder we are trying to access are set to Owner
which give full access to read, write and update the folder.

The code we are using is as follows.

Dim OlApp As Outlook.Application
Dim OlNamespace As Object
Dim cItem As Object
Set OlApp = New Outlook.Application
Set OlNamespace = OlApp.GetNamespace("MAPI")

'fldr is set to the folder that we want to add items to

Set cItem = fldr.Items.Add(2)
conItem.FullName = "Name"
conItem.Email1Address = "emailaddress"
conItem.Save

I would imagine that if this folder was stored client side that we
would not be running into this problem. But as we are accessing this
folder from a client machine using the Outlook object model and the
folder is actually an Exchange object we are running into problems.

Is there a better way to accomplish this goal? Should we be trying to
do this using a SQL stored procedure for instance or are we just
missing a permission setting somewhere. We are able to make changes
and add contacts to this folder from within Outlook but have been
unable to do this programmatically.
 

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