B
Boy from Oz
I am trying to work out how to create a folder in Outlook that is on the same
level as the Inbox. The code I am working with is:
Dim onMAPI As NameSpace
Dim ofInboxFolder As MAPIFolder
Dim ofNewFolder As MAPIFolder
Set onMAPI = Application.GetNamespace("MAPI")
Set ofInboxFolder = onMAPI.GetDefaultFolder(olFolderInbox)
On Error Resume Next
If ofInboxFolder.Folders("New Folder") Is Nothing Then
ofInboxFolder.Folders.Add "New Folder", olFolderInbox
End If
Set ofInboxFolder = Nothing
Set ofNewFolder = Nothing
Set onMAPI = Nothing
How to I make this: Set ofInboxFolder = onMAPI.GetDefaultFolder(olFolderInbox)
be the "Mailbox - Username" Folder?
On the same point, how do I then reference this new folder to capture when a
new message is dropped/created in it?
Thanks in advance.
level as the Inbox. The code I am working with is:
Dim onMAPI As NameSpace
Dim ofInboxFolder As MAPIFolder
Dim ofNewFolder As MAPIFolder
Set onMAPI = Application.GetNamespace("MAPI")
Set ofInboxFolder = onMAPI.GetDefaultFolder(olFolderInbox)
On Error Resume Next
If ofInboxFolder.Folders("New Folder") Is Nothing Then
ofInboxFolder.Folders.Add "New Folder", olFolderInbox
End If
Set ofInboxFolder = Nothing
Set ofNewFolder = Nothing
Set onMAPI = Nothing
How to I make this: Set ofInboxFolder = onMAPI.GetDefaultFolder(olFolderInbox)
be the "Mailbox - Username" Folder?
On the same point, how do I then reference this new folder to capture when a
new message is dropped/created in it?
Thanks in advance.