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

Can not run 'Enable and Disable Add-in Commands' when using setStartupBehavior(Office.StartupBehavior.load) #1997

Closed
sitthinan opened this issue Jul 21, 2021 · 7 comments
Assignees
Labels
Area: add-in UI Issue related to UI features such as Fabric, dialogs, add-in commands, etc. Area: add-ins platform Issue related to the add-ins platform Area: Excel Issue related to Excel add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@sitthinan
Copy link

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Office on the web
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Operating System: Windows 10
  • Browser (if using Office on the web): Google Chrome

Expected behavior

The button on my ribbon should be enabled or disabled following the logic after I reopen or refresh my workbook such as the sign-in button should disable when the user login.

Current behavior

After I refresh my workbook, The button on my ribbon always shows as the default status

Steps to reproduce

  1. Open a new workbook.
  2. Loading the add-in.
  3. Click the button on the ribbon.
  4. The 'Office.addin.setStartupBehavior(Office.StartupBehavior.load);' was run
  5. the 'Office.ribbon.requestUpdate(ribbonUpdater)' was run for changing status from enable to disable and it working well.
  6. Reopen or refresh the workbook.
  7. After my add-in was run, it shows the error when running the Office.ribbon.requestUpdate(ribbonUpdater).

Context

We want to run code in my add-in when the workbook was reopened or refresh to change the status of the ribbon between enabled and disabled,

Useful logs

  • [/] Screenshots
    image

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.

@ghost ghost added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jul 21, 2021
@AbidRahman-MSFT AbidRahman-MSFT added Area: add-in UI Issue related to UI features such as Fabric, dialogs, add-in commands, etc. Area: add-ins platform Issue related to the add-ins platform Area: Excel Issue related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jul 22, 2021
@sitthinan
Copy link
Author

Hi, has any updates for this ticket?

@jerousseau
Copy link

I've nearly the same problem creating a contextual tab, and using Office.StartupBehavior.load.
When the add-in is loading at workbook open the contextual tab never appear (but without error in my case).

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT 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 Aug 9, 2022
@ElizabethSamuel-MSFT
Copy link
Contributor

@sitthinan @jerousseau Apologies for the late response. Are you still facing this issue?

@preethikakiru Can you take a look?

Thanks.

@ghost ghost added the Status: no recent activity Issue or PR is stale (no recent activity) label Aug 14, 2022
@ghost
Copy link

ghost commented Aug 14, 2022

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!

@ghost
Copy link

ghost commented Aug 17, 2022

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

@ghost ghost closed this as completed Aug 17, 2022
@wh1t3cAt1k
Copy link

wh1t3cAt1k commented Dec 20, 2022

I've nearly the same problem creating a contextual tab, and using Office.StartupBehavior.load. When the add-in is loading at workbook open the contextual tab never appear (but without error in my case).

This is exactly what I am experiencing in Excel Online only. I can't believe such issues go for months and years without an update or a response from the team. :(

image

I am now working to prepare a minimal repro.

cc @gmichaud

@ghost ghost removed the Status: no recent activity Issue or PR is stale (no recent activity) label Dec 20, 2022
@wh1t3cAt1k
Copy link

@Wenjun-Gong @ElizabethSamuel-MSFT

I decided to file a new ticket with clean steps and reproduction code: #3052

@sitthinan @jerousseau If this is still relevant to you I invite you to comment.

It's a blocker for our planned interface revamp because

  • our add-in needs to run some code on start-up
  • and at the same time it will heavily rely on the contextual ribbon for some of the user interactions.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: add-in UI Issue related to UI features such as Fabric, dialogs, add-in commands, etc. Area: add-ins platform Issue related to the add-ins platform Area: Excel Issue related to Excel add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

7 participants