79597864

Date: 2025-04-29 07:59:10
Score: 2
Natty:
Report link

recently i found this webpage: https://medium.com/@python-javascript-php-html-css/outlook-add-ins-retrieving-the-original-email-address-fb117202791c

There is an interesting code-snippet:

Office.onReady(() => {
  // Ensure the environment is Outlook before proceeding
  if (Office.context.mailbox.item) {
    Office.context.mailbox.item.onMessageCompose.addAsync((eventArgs) => {
      const item = eventArgs.item;
      // Get the itemId of the original message
      item.getInitializationContextAsync((result) => {
        if (result.status === Office.AsyncResultStatus.Succeeded) {
          console.log('Original Item ID:', result.value.itemId);
        } else {
          console.error('Error fetching original item ID:', result.error);
        }
      });
    });
  }
});

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: AxelG