Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Can one Filter File types in wdDialogFileOpen?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
toolmaker - 14 Apr 2005 21:40 GMT
I'd like to filter the file selection in the wdDialogFileOpen dialog.  I know
you can do it in MSO File Dialogs, but I can't find a way to do it with the
Word dialog.

Any ideas?
Anand.V.V.N - 15 Apr 2005 15:27 GMT
Hi toolmake hope this follwing code helps you

With Dialogs(wdDialogFileOpen)
   .Name = "*.*"
   .Show
End With

I tried adn it works perfectly
Anand

> I'd like to filter the file selection in the wdDialogFileOpen dialog.  I know
> you can do it in MSO File Dialogs, but I can't find a way to do it with the
> Word dialog.
>
> Any ideas?
toolmaker - 15 Apr 2005 15:41 GMT
Hi Anand:

Thanks for your help.  I had stumbled across the same solution last night,
but then found a new problem:  wdDialogFileOpen can't handle opening multiple
files.

I decided to use the msoFileDialogOpen instead, which caused a third odd
problem.  It kept re-Showing my hidden form as well as the dialog.  I decided
I had to unload the form first so that it wouldn't come back uninvited.

Here's the code.  If you have any suggestions, please do pass them on:

Private Sub btnSelectFiles_Click()
   Dim fd As FileDialog
   Set fd = Application.FileDialog(msoFileDialogOpen)
   Unload frmBTS_Tables
   With fd
       .AllowMultiSelect = True
       .Filters.Clear
       .Filters.Add "All files", "*.*"
       .Filters.Add "Tables", "*.tbl", 1
   End With
   If fd.Show = -1 Then
       fd.Execute
       btsTableToDoc
   Else
       MsgBox ("BTS Convert Tables will now quit.")
       Exit Sub
   End If
End Sub

N.C. Gordon ("Toolmaker")

> Hi toolmake hope this follwing code helps you
>
[quoted text clipped - 11 lines]
> >
> > Any ideas?
Anand.V.V.N - 16 Apr 2005 09:30 GMT
Hi toolmaker,

I don't know if this would help, would it possible to create your own dialog
box in a form and display it everytime, that's actualyl very easy. That
should solve the problems.

In one situatuion, not similar to yours though, I created my own dislog box
uisng a form in vb, and not face such problems. I used the dirve list box,
file list box and the other dir list box to do it.

You done some code in vb?

Hope this was of some help.

Anand
Anand.V.V.N - 18 Apr 2005 08:08 GMT
Tyr this one, may be it should work.

Have a command button and execute this code in the  click even
Dialogs(wdDialogFileOpen).Display

If you use onlt this I think it should solve your problem.

Anand
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.