Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / March 2008

Tip: Looking for answers? Try searching our database.

Get User Specified Folder Property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 05 Mar 2008 13:14 GMT
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
Ken Slovak - [MVP - Outlook] - 05 Mar 2008 14:16 GMT
What you want is the NameSpace.PickFolder() method. That returns a
MAPIFolder object for the folder the user selected.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>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
[quoted text clipped - 6 lines]
> Thanks,
> Rob
Rob - 05 Mar 2008 14:58 GMT
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

> What you want is the NameSpace.PickFolder() method. That returns a
> MAPIFolder object for the folder the user selected.
[quoted text clipped - 9 lines]
> > Thanks,
> > Rob
Rob - 05 Mar 2008 15:15 GMT
I also did try your suggested format as well and still got the error.

Set MyMessage = ns.PickFolder

> OK, I'm trying to test it by the below method and I am doing it wrong because
> of the errors I'm getting.
[quoted text clipped - 18 lines]
> > > Thanks,
> > > Rob
Rob - 05 Mar 2008 15:19 GMT
Nevermind! I fugured it out... I forgot to set the ns param. like such,

Set ns = GetNamespace("MAPI")

Thanks Tons!!

> I also did try your suggested format as well and still got the error.
>
[quoted text clipped - 22 lines]
> > > > Thanks,
> > > > Rob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.