Is there any way to get current opened word document's width with office-js package?

Khoa Pham 0 Reputation points
2023-07-24T04:06:57.8033333+00:00

I'm currently having some problem with inserting large images with the Javascript API. Based on my job's requirement I must use setSelectedDataAsync method with [HtmlCoercion](https://learn.microsoft.com/en-us/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion) option. Is there any how I can get the width of current word document to resize the image on my server?

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Word | For business | Windows
0 comments No comments
{count} votes

Your answer

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