Sign in to follow this  
Followers 0
Omatsei

Creating Contacts in New Folder in Outlook

2 posts in this topic

I've got some code that will create a new contacts folder in Outlook, then it will create new contacts... but the contacts only go into the default folder, not the newly created one. Does anybody know how to tell it to put the created contacts into the new folder?

Share this post


Link to post
Share on other sites



For anyone in the future, I figured it out (sorta). You have to move them into a folder after they're created.

$objOutlook = ObjCreate( "Outlook.Application" )
$objOLName = $objOutlook.GetNameSpace("MAPI")
$folder = $objOLName.PickFolder

(later in the code after you add someone / something)

$objNewItem.Move( $folder )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0