A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Get User Specified Folder Property



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 5th 08, 01:14 PM posted to microsoft.public.outlook.program_vba
Rob
external usenet poster
 
Posts: 146
Default Get User Specified Folder Property

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
  #2  
Old March 5th 08, 02:16 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Get User Specified Folder Property

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

--
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


"Rob" wrote in message
...
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


  #3  
Old March 5th 08, 02:58 PM posted to microsoft.public.outlook.program_vba
Rob
external usenet poster
 
Posts: 146
Default Get User Specified Folder Property

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




"Ken Slovak - [MVP - Outlook]" wrote:

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

--
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


"Rob" wrote in message
...
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



  #4  
Old March 5th 08, 03:15 PM posted to microsoft.public.outlook.program_vba
Rob
external usenet poster
 
Posts: 146
Default Get User Specified Folder Property

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

Set MyMessage = ns.PickFolder

"Rob" wrote:

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




"Ken Slovak - [MVP - Outlook]" wrote:

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

--
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


"Rob" wrote in message
...
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



  #5  
Old March 5th 08, 03:19 PM posted to microsoft.public.outlook.program_vba
Rob
external usenet poster
 
Posts: 146
Default Get User Specified Folder Property

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

Set ns = GetNamespace("MAPI")

Thanks Tons!!

"Rob" wrote:

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

Set MyMessage = ns.PickFolder

"Rob" wrote:

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




"Ken Slovak - [MVP - Outlook]" wrote:

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

--
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


"Rob" wrote in message
...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User Defined Field type property PocketRocket Outlook - Using Contacts 1 December 15th 07 12:43 AM
Create folder with "Empty this folder" property Rick Fears Outlook - General Queries 6 September 4th 07 01:46 PM
Searching by User Property Sick Boy Outlook and VBA 1 May 23rd 07 06:47 PM
Sharing Contacts Brings Up Property Folder Instead [email protected] Outlook - Using Contacts 1 May 10th 07 12:35 PM
How to permit user B to edit user A's meeting, Public Folder Vaughan Outlook - Calandaring 1 December 14th 06 02:40 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.