namespace.pickfolder Title bar

  • Thread starter Thread starter Steve Wright
  • Start date Start date
S

Steve Wright

Hi all

Is there any way to change the title bar of the popup window generated by
namespace.pickfolder command in VBA.

The problem is that I am using namespace.pickfolder to get the folder to
process emails from and the moving them to another folder also selected by
namespace.pickfolder and as this is done one after the other users are
having trouble distinguishing which box they are looking at.

I wolud like to be able to change the "Select Folder" title to "Select From
Folder" in the first instance and "Select To Folder" in the second instance.

Any help appreciated

Steve
 
You would have to replicate the functionality of PickFolder with your
own form and code.
 
Can you give me some idea of where to start as I'm reasonably new to all
this VBA stuff

Steve
 
Well, as an outline you would place a control on a VBA form in your
Outlook VBA project to display the folders. I'd probably use a
treeview control, which looks like the standard PickFolder control.
However, that control might not be available for use unless you have
Office Developer or Visual Studio 6 installed.

From there you would get each folder and place it in the treeview
control. Something like this:

Dim colFolders As Outlook.Folders
Dim lngCount As Long
lngCount = Application.Session.Folders.Count
For Each colFolders In Application.Session.Folders
Call AddFoldersToTreeview(colFolders)
Next

In this case AddFoldersToTreeview would be a recursive procedure that
would keep calling itself for each MAPIFolder that was in colFolders.
The initial calling procedure would also be recursive, calling itself
for each Folders collection under the NameSpace object
(Application.Session). In AddFoldersToTreeview you would have code to
add each set of folders as a node in the treeview control, placing a
"+" sign for each folder in the node that has its own subfolders.

It's not that difficult but it is tiresome to code all that,
especially for a beginner.
 
Back
Top