msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

changing the title of the pickfolder dialog

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Program VBA
Author Message
Southern at Heart



Joined: 15 Jan 2008
Posts: 3

PostPosted: Mon Feb 11, 2008 1:34 pm    Post subject: changing the title of the pickfolder dialog Reply with quote

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.
Southern@Heart

Archived from group: microsoft>public>outlook>program_vba
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Mon Feb 11, 2008 4:52 pm    Post subject: Re: changing the title of the pickfolder dialog Reply with quote

That dialog cannot be customized. If you want a different looking dialog you
will have to create it from scratch, using a treeview control to display the
folders and populating the treeview with your own code.

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


"Southern at Heart" wrote in
message @microsoft.com...
> 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.
> Southern@Heart
>
Back to top
View user's profile Send private message
Mark J. McGinty



Joined: 13 Aug 2007
Posts: 8

PostPosted: Wed Feb 13, 2008 9:34 am    Post subject: Re: changing the title of the pickfolder dialog Reply with quote

"Southern at Heart" wrote in
message @microsoft.com...
> 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... Smile


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
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Change Form Title I have a form which was created by someone who has now left the company. It has a title (in the top blue bar) when opened of W.Y.W.O. We want to change it. The subject field is not shown on the form. Thanks in advance. Derek

OE6 title page comes on & just stays there OE6 will not open, just stays on title page. Need help. -- FFFoster

Resource dialog box When I book a Resource that is configured to Auto Accept meeting requests, I get a confirmation popup/dialog box confirming or deny the meeting. If I select "do not show this again", but then change my mind later, how do I reset the dialog box to appear

TIP: Getting around the Outlook permission dialog I had to send out a bunch of emails using Excel, and of course I kept getting hit by an Outlook dialog requesting permission. I wrote a little VB app that I launch just before I sent the emails, and this app watchs for the dialog and fills it in automatic

" always use this program to open " dialog box An e-mail I got had an attachment. I had to pick a program to open it.I forgot to uncheck the alw ays use box, and the program work. How do I find the "always use " dialog box to uncheck it and select another program?
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Program VBA All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group