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

[Word.BorderCollection] can not set some property to None or Width (outsideBorderWidth, insideBorderWidth, outsideBorderType, insideBorderType) #5219

Open
jasonhieu1905 opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels
Area: Word Issue related to Word add-ins Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown

Comments

@jasonhieu1905
Copy link

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC
  • Host [Excel, Word, PowerPoint, etc.]: Word
  • Office version number: Current Channel 2412 (Build 18324.20044)
  • Operating System: Windows

Expected behavior

You should be able to set all possible values for Word.BorderCollection.

Current behavior

An exception is thrown: InvalidArgument.

Steps to reproduce

  1. Create a table style.
  2. Access the borders of the table style and set a property to Mixed or None
    targetBorders.outsideBorderWidth = 'Mixed';
  3. An "InvalidArgument" error is thrown in the console.

Link to live example(s)

Script Lab:
scriptlab.txt

Context

  • We have an add-in to update modified styles in the selected document. Currently, we use the RetrieveStylesFromBase64 API to get all styles and then apply updates to the current document. However, borders cannot be set to None or Mixed for certain properties.

Useful logs

image

  • User can have Mixed value in table border properties
    issueTable1
@microsoft-github-policy-service microsoft-github-policy-service bot added the Area: Word Issue related to Word add-ins label Dec 23, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: attention 👋 Waiting on Microsoft to provide feedback label Dec 23, 2024
@RuizhiSunMS RuizhiSunMS added Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Dec 23, 2024
@RuizhiSunMS
Copy link
Contributor

RuizhiSunMS commented Dec 23, 2024

Thx @jasonhieu1905, for reaching out here. I can repro it. Mark it as #9644520 into our backlog. I will involve our experts asap. Will reply here if any update.
Btw, would you please confirm that, only "none" and "mixed" don't work while those "ptXXX"s work as expected?

@RuizhiSunMS RuizhiSunMS added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label Dec 23, 2024
@jasonhieu1905
Copy link
Author

Yes, "ptXXX" seems to be working.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Dec 23, 2024
@RuizhiSunMS RuizhiSunMS removed the Needs: attention 👋 Waiting on Microsoft to provide feedback label Dec 23, 2024
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 Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown
Projects
None yet
Development

No branches or pull requests

2 participants