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

changing the title of the pickfolder dialog



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old February 13th 08, 12:34 PM posted to microsoft.public.outlook.program_vba
Mark J. McGinty
external usenet poster
 
Posts: 56
Default changing the title of the pickfolder dialog


"Southern at Heart" wrote in
message ...
Set objFolder = olns.PickFolder
...when using this pickfolder dialog, can I change the title of the dialog
box to read:
"Pick a folder that contains the old contacts"
...or
"Pick a folder that contains the new contacts"

(I need to do both)
thanks.


As Ken said, the built-in picker dialog is quite limited, whatever it
returns is entirely in the hands of the user. To me, it's all but useless.
It practically forces you to either lead it off with an explanatory message
(ugly), or pop it up and hope like hell the user has a clue {likewise ugly.)

So I wrote my own, that allows calling code to optionally do any or all of
the following:

1.) Set it's title;
2.) Specify a node to be selected when it opens;
3.) Dictate the type of folder the caller expects to be returned;
4.) Show it asynchronously/modelessly (raising an event when it is closed);

It populates each branch of the tree on demand, so its performance is
reasonable with large numbers of items. It supports drag-and-drop movement
of branches, and it's new-item-creation UI is more intuitive than the
built-in.


When I wrote this for an AddIn project a year or two back, I also wrapped it
up in a COM DLL, along with a regular EXE as a test container. I've made it
available, with VB6 project sources, in case you are interested, at:

http://www.deprecatethis.com/upload/PickFolderEx.zip

On the down side, besides the source code, this email is about the extent of
its documentation... :-)


Further notes:

2.a.) Pre-selected node may be specified either by EntryID, or OOM constant
for any of the default folders (e.g., olFolderNotes.) If necessary,
ancester nodes are expanded until the specified node is visible.

3.a.) When an expected folder type is specified, that type is automatically
selected in the new folder UI. The user is free to change it, of course,
the user is free to create as many folders of whatever types he likes.

3.b.) If the user selects an existing (or just-created) folder of the wrong
type, and that folder is also empth, the code 'fixes' it up, by deleting the
selected folder and then creating a new one of the right type, in the same
place, with the same name. If the selected folder is *not* empty *and* is
the wrong type, the user is prompted to pick or create another one. (If the
selected folder is of the expected type, it does not need to be empty.)

A good bit of performance can be gained, using Redemption's MAPITables for
fast enumeration when populating -- I did this in the production version of
this code, it made a noticable difference.



-Mark



Southern@Heart



 




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
Pickfolder dialog box in Outlook event Irene Outlook and VBA 1 May 2nd 07 01:54 PM
Title bar Stewart Outlook - Calandaring 0 December 14th 06 10:44 AM
Get Public Folder Name - Automate PickFolder function FondaUK Outlook - Using Forms 5 December 7th 06 04:30 PM
changing columns in the select names dialog box J Miller Outlook - General Queries 4 October 27th 06 11:42 PM


All times are GMT +1. The time now is 03:40 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.