My code look like that:
function onInstall(e) {
onOpen(e);
}
function onOpen(e) {
DocumentApp.getUi().createAddonMenu()
.addItem("Format Your Text", "autoFormatting")
.addToUi();
}
function autoFormatting() {
//some code
}
What can cause this? How can I fix it?
I don't want to publish the add-on at the moment, but only to share it with other users from my domain.
If you wish to share an add-on for Google Docs with members of your domain, it first has to be published. There is no way around this.
From the Publishing G Suite add-on documentation:
Private add-ons are only visible to users in the same domain as the add-on publishing account. Only domain accounts can publish private add-ons. They can't be installed by outside users. Private add-ons do not require add-on review. Private visibility is also referred to as My Domain visibility.
And:
Visibility: Only published add-ons have a meaningful visibility status.
If you wish to have this add-on usable by other people in your domain, you first need to Privately publish it before it can be used.
Otherwise, you can send another user your add-on script and get them to follow the deployment steps to use it for their account.