Choose-outlook-startup-folder with VBA

Steven Proud

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
Hello, In Outlook I use PickFolder to choose a file folder within Outlook Explorer area.
Something like this code:

Set iNameSpace = myOutlookApplication.GetNamespace("MAPI")
'User Dialog Popup Window to choose a directory for Processing within Outlook
'Store Chosen Directory in variable "ChosenFolder"
Set ChosenFolder = iNameSpace.PickFolder
If ChosenFolder Is Nothing Then
GoTo ExitSub:
End If

What I want to do, is specify the start/default directory for the User Dialog Popup Window - so I can store the last try in registry, call it again later from registry the next time and specify it as starting point to choose.
I know the PickFolder has no option for this, BUT, what I did determine is that the "default" start directory is in fact what the user has specified as the start-up folder in Outlook.
If I change this, the next time I use PickFolder, it will sttart at this directory - GREAT!!!
upload_2015-4-13_9-30-12.png


Here is another link that shows how to change that directory:
http://www.slipstick.com/outlook/choose-outlook-startup-folder/

So, what I want to do, is use a macro/VBA code to change this Start-up directory dynamically whenever I want to, thus affecting my PickFolder default directory.

For the life of me, I cannot find out how to change this with VBA.

Please provide me code to change this property/configuration so I can get this working :)
 

Steven Proud

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
I don't think that would work as Outlook reads the registry only once at startup. See the Redemption, which is free for private users. Its PickFolder function allows to pass the start folder.
If I have outlook open and I use Its PickFolder function it defaults to the start folder. Then, if I simply change the start folder in the options menu, and then re-run the same code, it immediately defaults to the new folder I selected. This is what I determined before I asked the question.
I would really appreciate it if you could provide me the code to change that start-up directory so I could try it.
I have never heard of Redemption and for the sake of this one thing I would "like" to avoid learning something new.
If you insist on me using this Redemption thing, I suppose I will have to take the time.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I don't have a code for that. Note, Outlook can store and use the result of Pickfolder internally without the need to read the registry.
 

Steven Proud

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
At the end of the day, all I want to accomplish, is avoid the user having to select a directory every time I call the pickfolder in Outlook. I just want to be able to apply the last used folder in some way - storing it in Registry was what I thought of and have no issue doing, but I cannot find a way to specify a start folder for the PickFolder function.
Other than Redemption and other than Pickfolder, is there possibly another function that presents the user a popup dialog that has the ability to specify a default directory?
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
There's no such function, you'd have to program the entire dialog yourself.
 

Steven Proud

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
Ok, I tried many things and different resources that all dead ended.
I gave up on this due to the low usage of the pickfolder.
Thanks for all you help and effort!
 
Top