Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File and Open (with change of folder) 1

Status
Not open for further replies.

tolan

IS-IT--Management
Jun 9, 2001
15
GB

Hi

I've created a User Form which contains bullet points which refer to different folders. The idea is we have different folders which contain precedent files for different departments which users may access.

I know how to change the FileOpenDirectory. The problem is I can't get the File and Open Dialog Box to appear when I click OK on the form (after the appropriate bullet point has been selected).

There is the Word Command (File/Open) which can be added to the toolbar, but I want the user to be presented with the form and then check the bullet point containing the department's precedent files, then click OK and the File Open dialog box appears for them to select the particular file.

(I have searched around for this but most entries refer to opening files, rather than just opening at a particular folder and not doing anything else).

Is there a simple command for File and Open??

Any help appreciated.

Tolan
 
Code:
Option Explicit

Private Sub cmdOK_Click()
  Dim dlg As Dialog
  
  Set dlg = Dialogs(wdDialogFileOpen)
  
  dlg.Show
  
  Unload Me
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top