Thanks for reaching out! you're facing an issue with your VBA code for Outlook in Excel, particularly after upgrading to Office 365. Specifically, you’re encountering Error 287 when trying to get the signature via .HTMLBody. This error often arises due to security changes in Outlook related to programmatic access.
- Use WordEditor for HTML Manipulation: Instead of directly manipulating the
.HTMLBodyproperty, consider using theWordEditorobject. This method allows you to maintain the formatting in your email signature. - Test Error Handling: Implement error handling in your code to better understand if any specific line is causing the failure.
- Update Office Applications: Ensure that your Office applications are up to date, as updates can resolve compatibility issues. Go to File > Account > Update Options > Update Now.
- Consult Known Issues: Since you’ve moved to Office 365, review any known issues related to your version that may affect VBA scripting or Outlook functionality.