You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add a comment using the insertComment function of the Word.Range object the comment does not appear in the document.
Your Environment
Platform Word Online
Host: Word
Office version number: Latest
Operating System: Windows and Mac
Browser (if using Office on the web): Edge and Chrome
Expected behavior
After the comment is inserted it should be visible in the coments tab
Current behavior
The comment is not visible to the user who added the comment.
It is visible to other collaborators
Only appears in the comments list after the Word document is reloaded
After adding comment click on the comment symbol, which will disappear and open the comments tab that has no comments in it.
Reload word document and the comment will be there.
YAML file is included below
Context
IF the user cannot see all the comments, then they will not be able to delete them before creating a pdf file... Comments in the document make the pdf file worthless
YAML content:
name: Insert Comment
description: Make a selection in the document and click run
host: WORD
api_set: {}
script:
content: |
$("#run").on("click", () => tryCatch(run));
async function run() {
await Word.run(async (context) => {
const selection = context.document.getSelection();
selection.insertComment("textfieldValue");
await context.sync();
});
}
// Default helper for invoking an action and handling errors.
async function tryCatch(callback) {
try {
await callback();
} catch (error) {
// Note: In a production add-in, you'd want to notify the user through your add-in's UI.
console.error(error);
}
}
language: typescript
template:
content: |-
Run
language: html
style:
content: |-
section.samples {
margin-top: 20px;
}
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.
The text was updated successfully, but these errors were encountered:
I have the same problem: Word JavaScript API - Comments Not Displaying Immediately
Issue Summary:
When adding comments to a Microsoft Word document using the Word JavaScript API, the comments do not immediately appear in the document. A manual browser reload is required for them to become visible.
Environment:
Platform: Office on the Web (Word Online)
Host: Word
Browser: Edge (latest versions tested)
Steps to Reproduce:
Open a Word document in Word Online.
Use the Word JavaScript API to add a comment programmatically.
Observe that the comment is not immediately visible.
Reload the browser.
Observe that the comment now appears in the document.
Expected Behavior:
Comments added via the Word JavaScript API should appear in the document immediately, without requiring a browser reload.
Actual Behavior:
Comments are not displayed until the document is reloaded.
Issue occurs consistently across different browsers.
No error messages are thrown by the API.
Manually adding comments via the Word UI works as expected.
Other API functions like inserting text or tables work immediately without requiring a reload.
When I add a comment using the insertComment function of the Word.Range object the comment does not appear in the document.
Your Environment
Expected behavior
After the comment is inserted it should be visible in the coments tab
Current behavior
The comment is not visible to the user who added the comment.
It is visible to other collaborators
Only appears in the comments list after the Word document is reloaded
Steps to reproduce
Add a comment like so:
After adding comment click on the comment symbol, which will disappear and open the comments tab that has no comments in it.
Reload word document and the comment will be there.
YAML file is included below
Context
IF the user cannot see all the comments, then they will not be able to delete them before creating a pdf file... Comments in the document make the pdf file worthless
YAML content:
name: Insert Comment
description: Make a selection in the document and click run
host: WORD
api_set: {}
script:
content: |
$("#run").on("click", () => tryCatch(run));
language: typescript
template:
content: |-
Run
language: html
style:
content: |-
section.samples {
margin-top: 20px;
}
language: css
libraries: |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
@types/office-js
[email protected]/dist/css/fabric.min.css
[email protected]/dist/css/fabric.components.min.css
[email protected]/client/core.min.js
@types/core-js
[email protected]
@types/[email protected]
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.
The text was updated successfully, but these errors were encountered: