Hmmm. I am not sure what is going on here.
If you add the line
msgInternal.Display
immerdiately after
Set msgInternal = CreateItemFromTemplate(tempFolder & tempFileName)
and remove the line
msgInternal.Delete
You will see that the message is created with the PDF attachment and the PDF is at that point a valid PDF. It then all goes wrong, and I cannot immediately spot the problem. The resulting 'pdf' file is not a PDF file. Examined with a hex editor it looks more like a message. Perhaps our Canadian friend can spot the deliberate mistake?