Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking into an Outlook public folder
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Linking into an Outlook public folder
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01550955
Message ID:
01550955
Views:
75
Hi All,

I'm trying to create a new contact in a public contact folder. I can create one in the main contacts folder easily enough but trying to add on into a public folder is failing on the last line below. the AddressBook2 line works fine but goes into the main contacts folder
#define olFolderContacts 10
*olFolderContacts2 = "Public Folders-All Public Folders-PantherProducts Contacts"
outlook = CreateObject("Outlook.Application")
namesp = outlook.GetNamespace("MAPI")

MyFolder1 = namesp.Folders("Public Folders")
MyFolder2 = MyFolder1.Folders("All Public Folders")
MyFolder3 = MyFolder2.Folders("PantherProducts Contacts")

AddressBook2 = NameSp.GetDefaultFolder(olFolderContacts)

AddressBook = NameSp.folder(MyFolder3)

Contact = AddressBook.Items.Add()

WITH Contact
...
~M
Go raibh maith agat

~M
Reply
Map
View

Click here to load this message in the networking platform