Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / December 2006

Tip: Looking for answers? Try searching our database.

Creating address book from Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Stanton - 08 Dec 2006 14:54 GMT
I am trying to create an address book from MS Access.from a yacht club
database using vb code.

Programatically I can add a subfolder to Contacts (Address book) called
"Yacht Club". I can add contacts and emails without trouble, but they add
into the "Contacts" folder instad of the "Yacht Club" folder.

How do I force the additions to be in the required folder?

Thanks,

Phil
Sue Mosher [MVP-Outlook] - 08 Dec 2006 17:31 GMT
To create a new item in a non-default folder programmatically, use the Add method on the target folder's Items collection:

   Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the target MAPIFolder. Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public
.outlook.program_vba


Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

>I am trying to create an address book from MS Access.from a yacht club
> database using vb code.
[quoted text clipped - 8 lines]
>
> Phil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.