Issue
The following error may be received when sending an email with the following conditions:
- Word to Email option is selected
- Preview On Screen is selected
Error Code
Insufficient Privilege: You do not have the permissions needed to delete Document.
Error is in expression '(!sendEmail)' in page loop:email: (Loop)
Resolution
Ensure the Profile for the user getting this error message has Delete rights to the Documents Object.
- In Salesforce Setup Quick Search "Profiles" and Select Users > Profiles
- Select the Profile for the user with the error message
- Select Object Settings
- Select Documents
- Select Edit to edit the options
- Check the Delete option & Save
Additional Information
A temporary document is created when using Word to Email, with Preview to allow preview of the email. When the email is sent, the temporary file is deleted. If the user does not have permission to delete documents, then this step fails, and the email is not sent.