PC Review


Reply
Thread Tools Rate Thread

Create folders in another mailbox

 
 
DKY DKY is offline
New Member
Join Date: Sep 2008
Posts: 4
 
      17th Jun 2010
I found this code online which creates folders in the inbox but I'm trying to create folders in an inbox in another mailbox. I have a bunch of them to create so to do this programatically would be awesome! Thanks!

Code:
Public Sub psubSetUpFoldersInOutlook()
Dim oloUtlook As Outlook.Application
Dim ns As Outlook.NameSpace
Dim itm As Object

On Error Resume Next

Application.ScreenUpdating = False

Set oloUtlook = CreateObject("Outlook.Application")
Set ns = oloUtlook.GetNamespace("MAPI")
Set itm = ns.GetDefaultFolder(olFolderInbox)

itm.Folders.Add ("Name of Folder You want To add")

Set oloUtlook = Nothing
Set ns = Nothing
Set itm = Nothing

MsgBox "Outlook Set Up Succesfully"
ThisWorkbook.Close


End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Moved Sub-Folders of Mailbox to Sub-Folders of Inbox Tricia Sanders Microsoft Outlook Calendar 1 2nd Oct 2009 04:04 AM
How do I create folders so my mailbox is not overfull in Outlook? =?Utf-8?B?U3RldmU=?= Microsoft Outlook Discussion 2 2nd Aug 2007 08:08 PM
Two Mailbox Folders in Outlook, But Ive only Got One Mailbox HELP =?Utf-8?B?QnJhbmZvcmQgQXJtcyBQLkgu?= Microsoft Outlook Discussion 0 12th May 2005 05:50 PM
How can I create folders in another user's mailbox without sharin. =?Utf-8?B?SnVkeU0=?= Microsoft Outlook Discussion 1 4th Jan 2005 05:47 PM
Create user on win2k domain does not create mailbox on ex2k server Jeff Howard Microsoft Windows 2000 0 1st Oct 2003 12:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 PM.