Gasman
Enthusiastic Amateur
- Local time
- Today, 17:05
- Joined
- Sep 21, 2011
- Messages
- 16,039
Yes, that is due to the function??????Debug.Print
Which is correct. the file extension just does not auto populate to PDF but to All Files
View attachment 95376
I am using 2007-2016 version
Clue (which if the code was indented would be easy to see?)
Code:
If lngType <> 2 And lngType <> 4 Then
'Reset then add filter patterns separated by tildes (~) where
' multiple extensions are separated by semi-colons (;) and the
' description is separated from them by a comma (,).
' Example strPattern :
' "MS Access,*.ACCDB; *.MDB~MS Excel,*.XLSX; *.XLSM; *.XLS"
.filters.Clear
For Each varEntry In Split(strPattern, "~")
.filters.Add Split(varEntry, ",")(0), Split(varEntry, ",")(1)
Next varEntry
End If
What value of lngType are you passing???????
AGAIN! if you walked through the code, you would find that immediately
Plus you have commented out so much of the code that it is hard to see the wood for the trees???