File Open - Preview Files

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

ArchieD via OfficeKB.com

Hi All

We use the code shown at the end of this message to display the Word File
Open dialog. (We used this because the regular File Open command would
intermittently drop back to 'My Documents' rather than the file path we
requested - long story). I notice that if I use the ordinary Word File Open
command the user can see a preview of the selected document (assuming they
have selected Views, Preview). I am talking here about the preview type
where you see the top corner of the document & can scroll through it, rather
than the picture preview.

However, when using the code below, this is not possible. I can see a
picture preview if the option to 'save preview' is set for the document but
cannot see just the regular preview.

Can anyone tell me how to achieve this, please?

Many thanks in advance.

Archie

****************************

Dim OpenButtonPressed as Integer

Set fDialog = Application.FileDialog(msoFileDialogOpen)

With fDialog
.Title = "My File Open"
.InitialFileName = Folder_Path 'e.g. c:\branch names\
.FilterIndex = Filter_Index("Open")
.AllowMultiSelect = True
OpenButtonPressed = .Show
End With

If OpenButtonPressed = -1 Then
For intSelectedFiles = 1 To fDialog.SelectedItems.Count '- 1
strFileName = fDialog.SelectedItems(intSelectedFiles)
Documents.Open strFileName, addtorecentfiles:=True
Next
End If
 

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