Create Public Folder (use in Exchange) 
Author Message
 Create Public Folder (use in Exchange)

Hi,
I want to create a app which creates a public folder with contacts in it.
When I try to run the next lines I get an error

    Dim ol As New Outlook.Application
    Dim ns As Outlook.NameSpace
    Dim fdsConts As Outlook.MAPIFolder, xx As Outlook.MAPIFolder

    Set ns = ol.GetNamespace("MAPI")

    'Reference the default Public folder.
    Set fdsConts = ns.Folders(1)

    'Add a new folder
    fdsConts.Folders.Add "General Contacts" <-- err on this line -2147352567
    Set xx = fdsConts.Folders("General Contacts")

the error means Could not create folder

Please reply

Ton van Rijswijk



Mon, 22 Nov 2004 15:49:19 GMT  
 Create Public Folder (use in Exchange)
By looking at this code, you are trying to create a folder right off of the
folder named "Public Folders".  I don't believe anyone can create folder off
of this folder.  You need to drill down one more to "All Public Folders" and
then create your Contact folder.


Quote:
> Hi,
> I want to create a app which creates a public folder with contacts in it.
> When I try to run the next lines I get an error

>     Dim ol As New Outlook.Application
>     Dim ns As Outlook.NameSpace
>     Dim fdsConts As Outlook.MAPIFolder, xx As Outlook.MAPIFolder

>     Set ns = ol.GetNamespace("MAPI")

>     'Reference the default Public folder.
>     Set fdsConts = ns.Folders(1)

>     'Add a new folder
>     fdsConts.Folders.Add "General Contacts" <-- err on this
line -2147352567
>     Set xx = fdsConts.Folders("General Contacts")

> the error means Could not create folder

> Please reply

> Ton van Rijswijk



Mon, 22 Nov 2004 20:50:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Create Exchange Public Folders with Specified ACL Permissions with VB

2. Create Exchange Public Folders with Specified ACL Permissions

3. Create Exchange Public Folders with Specified ACL Permissions with VB

4. Using Crystal Reports 8.5 to Report Fields From Public Contacts Folder on Exchange 5.5 Server

5. Exchange Public Folder as Recordset

6. Link Exchange Public folder to Access 97

7. From Acces97 to an Exchange public folder

8. Programmatically posting to a specific Exchange public folder

9. Programmatically post a .ppt file to an Exchange public folder

10. import data from a .dbf-file into a public folder from exchange

11. Reading public folders on exchange server

12. Posting to Exchange Public Folder.

 

 
Powered by phpBB® Forum Software