J
Jen
I have leveraged a macro I found online to create a new folder
underneath the default Inbox, with a name entered by the user.
However, what I REALLY want is to create the new folder under a folder
that lives in another PST.
So instead of:
Mailbox
--Inbox
----New Folder
Users PST
--Project
I want it to be created as follows:
Mailbox
--Inbox
Users PST
--Project
----New Folder
Here is the code I have so far - can anyone help?
Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myNewFolder As Outlook.MAPIFolder
Dim newProjectName As String
newProjectName = InputBox(Prompt:="You name please.", _
Title:="ENTER YOUR NAME", Default:="ENTRY")
Set myolApp = CreateObject("Outlook.Application")
Set myNamespace = myolApp.GetNamespace("MAPI")
Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myNewFolder = myFolder.Folders.Add(newProjectName)
underneath the default Inbox, with a name entered by the user.
However, what I REALLY want is to create the new folder under a folder
that lives in another PST.
So instead of:
Mailbox
--Inbox
----New Folder
Users PST
--Project
I want it to be created as follows:
Mailbox
--Inbox
Users PST
--Project
----New Folder
Here is the code I have so far - can anyone help?
Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myNewFolder As Outlook.MAPIFolder
Dim newProjectName As String
newProjectName = InputBox(Prompt:="You name please.", _
Title:="ENTER YOUR NAME", Default:="ENTRY")
Set myolApp = CreateObject("Outlook.Application")
Set myNamespace = myolApp.GetNamespace("MAPI")
Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
Set myNewFolder = myFolder.Folders.Add(newProjectName)