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

Can't access context.document.customXmlParts in Word for iPad #5500

Open
FelipeCostaGualberto opened this issue Mar 17, 2025 · 1 comment
Open
Assignees
Labels
Area: Word Issue related to Word add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback

Comments

@FelipeCostaGualberto
Copy link

It seems there's an issue with when calling context.sync() in Word for iPad when

  • acessing .load("items/id") of a context.document.customXmlParts.
  • acessing .getXml() of context.document.customXmlParts.getItem.

Your Environment

  • Platform: iPad Air (3rd generation)
  • Host: Word
  • Office version number: 2.95.25031036
  • Operating System: iOS 18.3.2

Expected behavior

It is expected that I can acess Custom XML Parts in Word. The very same manifesto/app sucessfully loads, access and updates Custom XML Parts in Word for Desktop, Word Online, Word for Mac.
Also, it works correctly in every Excel version (including iPad) and every PowerPoint version (except iPad, because it doesn't have the required requirement set, but that it is expected).

Current behavior

When trying to acess Custom XML Parts in Word for iPad, I get the exception RichApi.Error.

Steps to reproduce

Since ScriptLab doesn't work on iPad, create (and deploy) a minimal Office Addins with this script and test it in Word for iPad:

$("#run").on("click", () => tryCatch(run));

async function run() {
  await Word.run(async (context) => {
    // This doesn't work in Word for iPad.
    const partsCollection = context.document.customXmlParts;
    partsCollection.load("items/id");
    await context.sync();
    
    console.log(partsCollection);
  });
}

async function tryCatch(callback) {
  try {
    await callback();
  } catch (error) {
    console.error(error);
  }
}

Context

I need to subit an Add-in that manages Custom XML Parts for Word to the Office Store, and this could be a barrier for the Add-in approval.

Useful logs

Screenshot:
Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area: Word Issue related to Word add-ins label Mar 17, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: attention 👋 Waiting on Microsoft to provide feedback label Mar 17, 2025
Copy link
Contributor

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Word Issue related to Word add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback
Projects
None yet
Development

No branches or pull requests

2 participants