A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Outlook » Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating address book from Access



 
 
Thread Tools Display Modes
  #1  
Old December 8th, 2006, 02:54 PM posted to microsoft.public.outlook.contacts
Phil Stanton
external usenet poster
 
Posts: 17
Default Creating address book from Access

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


Ads
  #2  
Old December 8th, 2006, 05:31 PM posted to microsoft.public.outlook.contacts
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 7,177
Default Creating address book from Access

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/comm....program_v ba

--
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

"Phil Stanton" wrote in message ...
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.