OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
653 stars 93 forks source link

Way to turn off track changes from office documents #4591

Open ishanig11 opened 1 week ago

ishanig11 commented 1 week ago

Can you tell me how to turn off track changes before inserting data from another document?

jeremy-msft commented 1 week ago

Hi @ishanig11, please see the documentation for Word.ChangeTrackingMode enum, which includes a sample for how to get and set the change tracking mode.

ishanig11 commented 1 week ago

I tried as context.document.changeTrackingMode = Word.ChangeTrackingMode.off; but I am getting context.document.changeTrackingMode not available exeception.

xiruatms commented 6 days ago

@ishanig11 , thanks for reporting this. Will you please provide more information? Which platform are you using(Desktop?Word Online?)? What're the code you're using? More details will help us understand your issues better.

ishanig11 commented 6 days ago

I want to use it for word,excel,ppt online as well as desktop version of office 365.

I am calling above code before opening document usinginsrtfromBase64 API.

xiruatms commented 6 days ago

Be noted: this API is supported on Word (both Desktop and Online), but not Excel & PPT. On which application did you encountered such exception please?

ishanig11 commented 6 days ago

On Word only.

xiruatms commented 6 days ago

If possible, will you please post your codes or screenshot here so that I can understand your issue? I can NOT repro it in my environment.