Get User Specified Folder Property

R

Rob

I was wondering how I would get a macro within Outlook 2003 to prompt the
user for a folder/sub-folder for the macro to use in the script? This is a
snipit of what I am working with.

Set MySubFolder = InputBox,,, ' Select the folder to work in.

As you can see I don't have much.

Thanks,
Rob
 
K

Ken Slovak - [MVP - Outlook]

What you want is the NameSpace.PickFolder() method. That returns a
MAPIFolder object for the folder the user selected.
 
R

Rob

OK, I'm trying to test it by the below method and I am doing it wrong because
of the errors I'm getting.


Dim ns As NameSpace
Dim MyMessage As MAPIFolder

Set MyMessage = ns.PickEmailFolders
MsgBox MyMessage
 
R

Rob

I also did try your suggested format as well and still got the error.

Set MyMessage = ns.PickFolder
 
R

Rob

Nevermind! I fugured it out... I forgot to set the ns param. like such,

Set ns = GetNamespace("MAPI")

Thanks Tons!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top