Hi,
I have some code that runs on a schedule to look through an outlook account, find attachments and save them.
The files are .xls files, and the macro saves them as "YYMMDD.xls" depending on the day they are sent.
Strangely, the files it has been downloading of late are corrupted as the file extension does not match the original file type. This implies that I'm saving them down as the wrong file type, but they are definitely .xls files.
Rather than hard-coding '.xls' into the filename in the code, is there a method I can use to save files as the file type they are sent in regardless of what it is, therefore making it dynamic? Something like 'FileName.CurrentFileType' ? This would help me in trying to find out why these files are apparently being corrupted
I have some code that runs on a schedule to look through an outlook account, find attachments and save them.
The files are .xls files, and the macro saves them as "YYMMDD.xls" depending on the day they are sent.
Strangely, the files it has been downloading of late are corrupted as the file extension does not match the original file type. This implies that I'm saving them down as the wrong file type, but they are definitely .xls files.
Rather than hard-coding '.xls' into the filename in the code, is there a method I can use to save files as the file type they are sent in regardless of what it is, therefore making it dynamic? Something like 'FileName.CurrentFileType' ? This would help me in trying to find out why these files are apparently being corrupted