I'm using Word's built-in File Open dialog to let the user select a PDF file. I'm only using the dialog to intercept the file name, then actually displaying it within a PDF viewer window.
I'd like my code to limit the list of files they see to PDF files, the equivalent of manually setting this drop-down arrow on the right.
Here's my code, and a few things that work for other types of dialogs that don't seem to work here.
' .Format = wdFormatPDF 'does not work
' .Filter = "PDF Files (*.pdf)" 'does not work
' .Name = "*.PDF*" 'does not work
If .Display Then
If .Name <> "" Then
sourcepdf = .Name
It works fine, but shows all files. Any ideas?