Property ribbon doesn't exist on office - controls

While working on enabling/desabling a control in an Excel web complement the editor throw the following error :""property 'ribbon' doesn't exist on type 'type of office'" from an 'Office.ribbon instruction'.
My Excel Version is : 2104 (Build 13929 20296)
Here is a snapshot of the code code with office.ribbon. This code comes from https://learn.microsoft.com/fr-fr/office/dev/add-ins/design/disable-add-in-commands. Note than isSetSupported('RibbonApi', '1.1') ==true
Screen shot :
Xml of my addin

Make sure you specified the latest Office JavaScript API library in the add-in manifest. If you use runtime checks, you need to reference the most current version of the Office JavaScript API library from the content delivery network (CDN). To do this, add the following script tag to your HTML. Using /1/ in the CDN URL ensures that you reference the most recent version of Office.js.
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>

A workaround is to use message boxes. Off course it's quite Ugly, but I need to publish my app shortly. I hope that by this time I will find a way to actually enable/desable commands on this addin.

Related

Office JS Save text as xml file Fails

I want to ask if Office JS is allowed to save local files?
In old question/answers I found various solutions like
FileSaver.js
Download2.js
I tried both but it did not help.
Both are using the technique of embedding a download link in the HTML document dispatching the event programmatically using JS. But click event fails with error = Access is denied
I want to ask if
Office JS API is allowed to create files to local path?
if NO was it allowed in older versions?
If YES do I need to make some configuration changes on Windows 10 desktop PC?
If allowed Please help how to achieve that
I want to create an XML file using JavaScript and save it to local path
thanks

Embedded Yammer Script in SharePoint 2010 CEWP Opens Multiple New Windows with different Yammer Feed

I have two Yammer feeds that I need to embed in SharePoint 2010 using CEWPs. Each is on a separate page. The web part is linking to a text file in the Style Library. One of them is working correctly and displaying the feed. However, the other is opening the feed in the web part, but also pops up two windows with the other feed.
Both are embedded using the same script with the correct parameters. The only difference in the two being the "FeedId". Below is the contents of the text files (with the "Network" and "FeedId" parameters changed for privacy).
<div id="embedded-feed" style="height:800px;width:400px;"></div>
<script type="text/javascript" src="https://s0-azure.assets-
yammer.com/assets/platform_embed.js"></script>
<script type="text/javascript">
yam.connect.embedFeed({
container: "#embedded-feed",
network: "myNet.com",
feedType: "group",
feedId: "1234567"
});
</script>
Why would one of these cause popups with a different feed and the other work as expected?
This is not really a programming question and therefore may be deleted from this site. You are best to test the same Embed snippets with the configuration tool and see if you have the same issues. If you do, open a support request from within the O365 Tenant Admin portal so that someone can investigate the issue specific to your environment.
You should also note that SharePoint 2010 uses unsupported Document Modes forcing Internet Explorer to run with a down-level engine. As a result, you can experience many issues.

IBM SBT extension property not working

the example code on
https://greenhouse.lotus.com/sbt/SBTPlayground.nsf/JavaScriptSnippets.xsp#snippet=Social_ActivityStreams_Controls_Simple_Stream_All_Extensions
I can see all extensions UI being displayed, but three of four configured extension do not work
1. save in extension does not work
2. commenting in extension does not work
3. delete in extension does not work
can see errors on all three of them on developer tools
I believe this is previously answered by Francis SBT javascript library
basically the playground uses dojo layers, the controls don't work with dojo layers.
Download the Toolkit
Extract the Tomcat Instance
Point the Instance to Greenhouse (Edit Managed-Beans.xml for sbt.samples.web)
Try the Control from
https://host:8443/
Navigate to the Control and Run it.
it should work from there.

API KIT Console in Mule not showing any Output

I tried to look through all the tutorials for RAML and I was pretty excited.
I found most of the online resources available but I could not understand why, when i set up everything and the flows are generated, then i run it locally as a mule application, when i point to localhost:8081/api/console/ i get a huuuuuuuge json response, but not the UI described for example here.
Yes i also faced the same issue with Any Point Studio. It is not at all displaying in the API KIT Console present in Any Point Studio. But to feel good and to see the output i have just tried it with Google Chrome Browser and i got the expected User Interface as i was expecting from API KIT Console. Hope this issue will be fixed from next release onwards.
Here is the URL i used to see it on Browser : http://localhost:8081/remote-vending/api/console/
Here is my output from Google Chrome browser for the API KIT Tutorial
My GUI didn't show in the Anytime studio tab: APIkit Consoles, one way to fix this:
make sure you have started your application
right click for the context menu
select encoding
click auto-select
I have had the same problem and resolved it by removing invalid whitespace. One of the example files I was including had an invalid trailing space.
The way I found out;
Open the Network panel in the Developer Toolbar in your browser
Go to http://localhost:8081/api/console/
Find the response for a request to '/api' with the request header 'Accept:application/raml+yaml'.
This response should contain the fully compiled RAML, where all include files have been included.
Copy this entire content into a new RAML-file in Anypoint Platform API Designer or some other YAML editor with error reporting.
It highlighted the invalid whitespace immediately for me.
It should work Out of the box.
It could be a bug of an earlier version.
Could you check the behaviour in more recent releases?
Changing my default browser from Firefox to Chrome resolved the issue for me.

Problem with Outlook plugin and webbrowser

I've created a couple of Office plugins. The plugin shows a set of html files installed on the clients computer. The plugin uses a COM-accessible assembly which shows a WinForm with a WebBrowser on it. The plugin makes the WebBrowser navigate to a file on the clients computer. The assembly is also used in other programs to show the same information.
When showing the local html files using a 'normal' browser (e.g. double clicking a file in Windows Explorer) the browser popup a security warning about running active content. This is because we have some javascript in it. This warning is supressed by setting the 'Allow active content to run in files on My Computer' in the Internet Explorer settings. This solves the issue using a 'normal' browser.
Funny enough the 'active content' warning is not shown when getting the same file using a Word/Excel/PowerPoint plugin. It calls the same assembly, using the same WinForm and using the same content. Despite the setting 'Allow active content to run from My Computer' being false, the content is shown without a warning and the javascript is executed.
Now, the problem and the real question is that Outlook does the reverse. No matter what I use for 'Allow active content to run from My Computer' the browser warning about the active content in the html file is shown. When I confirm the message and allow the scripts to continue, the javascript runs fine. So, even when I set the 'Allow active content to run from My Computer' to true, the warning is given.
I've gone through all (sort of) relevant settings in Outlook, but nothing helps.
I assume that Outlook is using some kind of private context for a webbrowser (probably because it is using a webbrowser object internally).
The real question is: how can I make the Outlook plugin respect the IE settings?
(I understand this is a long story and maybe not clear enough. Please let me know if I have to elaborate more).
I couldn't get rid of the security warning without lowering the security setting. And that is not an option: we are talking about a project that will be installed on millions of computers.
I decided to go another route. Let's see if we can make the browser trust the html pages. So, what to do to get rid of the 'Active content' warning.
First I investigated what exactly triggers the warning. That was easy: any tag in your html file will do. And I need script, so removing that isn't an option. But, when hosted from a website, the scripts run fine and don't suffer from a warning. So, I investigated if it is possible to run my files in the Internet-context.
I found out there is a way, at least for IE (which in my case is sufficient). If you save a webpage as a complete HTML file from IE, the browser adds a comment to the html to signal its origin. Something like: . If you later open that stored html file, the file is shown in the Internet context.
So, I tried adding to the html file. And, voila, the file is opened in the Internet context. The security warning about active content is gone and the scripts are executed fine.
But, that raised another problem. We have a couple of window.open statements in the scripts and using that causes he cross domain browsing problems that in recent IE versions are blocked. Even if you use a relative path in the window.open call, if fails and you end up with a blank window.
In our case, we can (probably) decide to get rid of the window.open calls. But, if a reader ever finds a solution for using window.open in this scenario, I would be very happy if you let me know.
So, for now: case closed...
Internet explorer use Mark of web in such cases
<!-- saved from url=(0014)about:internet -->
<!doctype html>
<!-- saved from url=(0023)http://www.contoso.com/ -->
<html>
<head>
<title>A Mark of the Web Example.</title>
</head>
<body>
<p>Hello, World</p>
</body>
</html>
More info from here
https://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

Resources