View Single Post
 
Old 10-09-2023, 04:59 AM
yanyan9896 yanyan9896 is offline Windows 10 Office 2019
Novice
 
Join Date: Oct 2023
Posts: 13
yanyan9896 is on a distinguished road
Default

Quote:
Originally Posted by Italophile View Post
The BrowseForFile function adds a filter to the File Picker dialog. As MergeMultiDocsIntoOne uses the same dialog without setting a filter it will inherit the filter from the previously used function.

The solution is simple - clear the filters, and optionally set a filter for the required file types, for the File Picker in your MergeMultiDocsIntoOne routine. You can simply copy and paste from the other function, e.g.

Code:
  With dlgFile
    .AllowMultiSelect = True
    .Filters.Clear
    .Filters.add "Word documents", "*.doc,*.docx,*.docm"

Thank you for your helpful explanation regarding the BrowseForFile function and its impact on the MergeMultiDocsIntoOne routine. I appreciate your suggestion to clear the filters and set a filter for the required file types in the File Picker dialog. I will implement this solution by copying and pasting the filter code from the other function.

Once again, thank you for your assistance.
Reply With Quote