-
Notifications
You must be signed in to change notification settings - Fork 96
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
context.application.createDocument works only first time #4771
Comments
Hi @ishanig11 Thanks for reporting this issue, I try this code to create document on word online, it works fine for each time. You can try this code: https://gist.github.com/shanshanzheng-dev/bf71a24597898b4f0cf4d52ab90306be |
what is difference compared to my code which I wrote in react. I see un block is similar to what I used. |
Hi @ishanig11, sorry, you use the code that I provided still hit a block? Could you share us your test document, the whole test code or repro video? Thanks. I'm not sure if I miss something, because I can create a new document every time when run this API. You can see this video: Screen.Recording.2024-08-13.at.04.51.48.mov |
Please try this in online version. No issue with desktop. |
Yes, my video is word online. |
If you see everytime tab is opening but its replacing document6 with document7 and so on.. we dont see them under new tabs. |
Hi @ishanig11 currently, this is our by-design behavior. But you can submit a new Tech Community New Ideas item, this will give us visibility of the commonality of it and will help with our prioritization. If we end up working on this issue, we will re-activate as needed. Microsoft 365 Developer Platform - Microsoft Community Hub |
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins! |
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue. |
I am using below code to open document in new tab. This code is working fine for first time. After that its opening document in tab which is previously opened. Can you check code and let me know what change I need to make to handle this issue?
export const openDocument = async (file) => {
await Word.run(async (context) => {
const response = await toBase64(file);
var externalDoc = context.application.createDocument(response);
externalDoc.open();
await context.sync();
const builtInProperties = context.document.properties.customProperties;
builtInProperties.load("*");
await context.sync();
});
};
The text was updated successfully, but these errors were encountered: