Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Office.CoercionType.Text returns different values on Outlook Classic vs Web Outlook for whitespaces #5310

Closed
alensaqe opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Possible-Solution Similar-Issue Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs

Comments

@alensaqe
Copy link

alensaqe commented Jan 24, 2025

Provide required information needed to triage your issue

Your Environment>

  • Platform [PC desktop, Mac, iOS, Office on the web]: Outlook Classic, Outlook Web, Outlook New

Expected behavior

All versions return the same value with the spaces

Current behavior

The response from outlook on get Async Body seems to be different in Outlook Classic, Outlook New and Outllook web. With the prior sending whitespaces as in\n \rthe new ones do not send any results with whitespaces.

Steps to reproduce

  Office.context.mailbox.item?.body.getAsync(Office.CoercionType.Text, (result) => {
    console.log('value', result.value)
  })
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 24, 2025
Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

The body.getAsync API returns the body based on Outlook's editor, and the results between each platform are expected to have some differences. Unfortunately, the plain text converter is not documented across all the different platforms, and is different in every platform. Therefore, achieving consistent results across platforms is not possible at this time.

Reference:

@alensaqe alensaqe changed the title ffice.CoercionType.Text returns different values on Outlook Classic vs Web Outlook for whitespaces Office.CoercionType.Text returns different values on Outlook Classic vs Web Outlook for whitespaces Jan 24, 2025
@slabereemsft slabereemsft added Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 27, 2025
@alensaqe
Copy link
Author

Based on #1015 outlook clients return different payload depending on the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Possible-Solution Similar-Issue Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests

3 participants