justme
Well-known Member
- Joined
- Aug 26, 2002
- Messages
- 729
Code:
TempFilePath = Environ$("temp") & "\"
TempFileName = UserName & (wb1.Name)
FileExtStr = "." & LCase(Right(wb1.Name, Len(wb1.Name) - InStrRev(wb1.Name, ".", , 1)))
FileExtStr = "." & LCase(Right(wb1.Name, Len(wb1.Name) - InStrRev(wb1.Name, ".", , 1)))
This is a line of code from Ron de Bruins site. I can not figure out what it is saying, but I think it is the line of code which is naming the extension of a temporary file before emailing it. I am getting an error because the file is coming back with two .xls.xls extensions and it is going to the quarantine folder.
Question 2:
Another line of code reads
TempFileName = UserName & (wb1.Name)
I understand this to mean that the name of the attachment should be the username plus the name of the workbook, but what I am actually getting is the name of the workbook minus the very first letter of the name of the workbook plus .xls.xls
So, I am expecting to see
MyName ActiveWorkbook Name.xls
I am seeing
ctiveWorkbook Name.xls.xls