Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > FileDialog
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 10th June 12:40
phil
External User
 
Posts: 1
Default FileDialog



Hi all,

Using Outlook 2K and am struggling to display an openfile box to let a user
select a text file to import names-address pairs in a distribution list.

Outlook XP seems to use a FileDialog collection, which I can't make work and
Outlook 2K doesn't seem to have it...

Anyone to help me, poor beginner with Outlook VBA???

Thx

Phil
  Reply With Quote


  sponsored links


2 10th June 12:40
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default FileDialog



If you want to use the standard Windows File Open dialog it's in one
of the Windows common controls. It's called the Microsoft Common
Dialog Control (comdlg32.ocx).

In your code you would use something like this:
Dim objCommonDialog1 As CommonDialog

'set properties for common dialog like Filter, DialogTitle,FileName,
DefaultExt, FileTitle, etc.
objCommonDialog1.ShowOpen

However, that control is only available for your development use if
you have Office Developer or VB6. Otherwise you'd have to construct
your own dialog and get/set all the properties you want to use for the
dialog.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
  Reply With Quote
3 10th June 12:41
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default FileDialog


I don't know how far back you go with the versions of Windows you use,
but comdlg32.ocx should certainly be there, especially if Office is
installed. Office uses that OCX for its own file open/save/etc.
operations. I've never had to distribute it for my apps.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
  Reply With Quote
4 20th June 01:44
phil
External User
 
Posts: 1
Default FileDialog


True...I'm using W2K...I was just trying to stick with Office-type stuff. It
actually works with Excel or Word Dialogs collection, excepted you can't set
any Z-order property and the Dialogs box stays in the background until you
Alt-Tab!! Weird...I'll follow your advice and use common control ((-;

Thanks Ken,

Best regards from Paris, France
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666