Inserting Border on a text via Ooxml is not Working on Word Online

Flores, Kevin Leo 0 Reputation points
2024-02-16T06:39:39.7166667+00:00

I need to insert a border that applies to the text. but I can't find on the API to achieve this functionality.

As a work around, I get the ooxml (Word.Range: getOoxml) and insert the border attribute to the text and then reinserting the ooxml(Word.Range: insertOoxml).

For the Desktop env, the code is working normally and when we checked this on the borders and shadings, we can see that it is applied to text

User's image

For the Online env, inserted text have no border. Even I manually added the border, it is being removed on the Word Online. Does the Word Online not supporting the border that is applied to text?

User's image

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Word | For business | Windows
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.