In Office 365 there are tons of security control and one of them is #safeattachment. This control will help you safeguard against any malicious attachments. Check this out , how to configure this option and secure you tenant. This is part of Office 365 Advanced Threat Protection feature.