Greg should be sleeping at the moment, but looking at his code I suspect the following should work, though I haven't tested it.
You will need a function to get the original extension and add that instead of .png
e.g.
Code:
Name strBasePath & strExtractionFolder & "_files\" & _
strName As strBasePath & strExtractionFolder & "_files\" & _
strImageName & GetExtension(strfname)
The function would be
Code:
Function GetExtension(ByRef StrFilename As String) As String
GetExtension = VBA.Right(StrFilename, Len(StrFilename) - InStrRev(StrFilename, Chr(46)) + 1)
lbl_Exit:
Exit Function
Err_NoExtension:
GetExtension = vbNullString
Resume lbl_Exit
End Function
Greg is a good friend who I work with a lot so I have used his vba formatting style, to match the other processes.
You can get rid of the SpecialFolderPath function as your modified version of the code doesn't call it. In any case it is not a good idea to save to the Desktop. That is a special type of folder and some write functions from VBA may not work as expected when it is used.