FileDialog - add to MRU files list?

  • Thread starter ArchieDog via OfficeKB.com
  • Start date
A

ArchieDog via OfficeKB.com

Hi All

I'm using the FileDialog to create an alternative File Open command in Word.
Is there a way to add the file(s) opened to the most recently used files list
on the File menu? Code is shown below. Folder_Path & Write_Filter_Index are
other functions I've written.

As always, all help gratefully received.

ArchieDog

Dim fDialog As FileDialog
Dim OpenButtonPressed As Integer
Dim lngFilterIndex As Integer
Dim strFolderPath As String
Dim intSelectedFiles As Integer

intSelectedFiles = 0

Set fDialog = Application.FileDialog(msoFileDialogOpen)
With fDialog
.Title = "IOS InterAlia Open"
.InitialFileName = Folder_Path
.FilterIndex = Filter_Index
.AllowMultiSelect = True
OpenButtonPressed = .Show
End With

If OpenButtonPressed = -1 Then
For intSelectedFiles = 0 To fDialog.SelectedItems.Count - 1
fDialog.Execute
Next
Write_Filter_Index (fDialog.FilterIndex)
End If
 
D

Doug Robbins - Word MVP

If you use Documents.Open to open the files, AddtoRecentFiles can be
invoked.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top