File online with the 'section 38' app. assuming that you're already registered at your friend's address. Very easy after you've set yourself up with a login and password.
my point is that it is written that the letter should be no older that 7 days, however, it appears to be the case that if you try and give a bank letter that is anyway near 7 days old, immigration don't want to accept it.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.