Skip to content
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

Set document name using office.js API #4522

Closed
ishanig11 opened this issue May 29, 2024 · 6 comments
Closed

Set document name using office.js API #4522

ishanig11 opened this issue May 29, 2024 · 6 comments
Assignees
Labels
Area: Common APIs Issues related to common apis Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product question Question about the Office Add-ins platform or Office JavaScript APIs

Comments

@ishanig11
Copy link

Hi,

I am loading file in office active context application using API context.document.body.insertFileFromBase64.

After file load, want to set file name. Currently default filename get set. Refer below screenshot.
image

Can you tell me how we can set file name to office applications like Word, Excel and Powerpoint?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label May 29, 2024
@jipyua
Copy link

jipyua commented May 30, 2024

hi @ishanig11 thanks for reaching out. So far for Word there is no direct API to set the file name, but if your document is a new file and hasn't be saved, then you can use the second parameter of document.save() API to provide and set a file name. See here for details: https://learn.microsoft.com/en-us/javascript/api/word/word.document?view=word-js-preview#word-word-document-save-member(1).

For any other new API requests, we track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum. Please add your request there and we will triage accordingly. thanks.

@jipyua jipyua added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels May 30, 2024
@ishanig11
Copy link
Author

@jipyua : I perform following steps:

  1. Open blank document in online office
  2. Load other document content into it using insertFileFromBase64 API
  3. So in this case how I can change name of document?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels May 30, 2024
@ishanig11
Copy link
Author

@jipyua : Any update on above question?

@AlexJerabek AlexJerabek added Type: product question Question about the Office Add-ins platform or Office JavaScript APIs Area: Common APIs Issues related to common apis labels Jun 3, 2024
@jipyua
Copy link

jipyua commented Jun 21, 2024

@ishanig11 at this case, I am afraid so far there is no way to change the name. As mentioned earlier, that will be a new feature request. We track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum. Please add your request there and we will triage accordingly. thanks.

@jipyua jipyua added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jun 21, 2024
@ishanig11
Copy link
Author

This is really blocker feature.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Jun 21, 2024
@shanshanzheng-dev
Copy link

Hi @ishanig11 Sorry for that. We recommend you to upvote a Tech Community 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.   Thanks.

@shanshanzheng-dev shanshanzheng-dev closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common APIs Issues related to common apis Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product question Question about the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests

4 participants