(* I clean up the initial thread *)
I want to add the UserVoice widget to one Excel add-in. I have made the following example code:
<!DOCTYPE html>
<html>
<head>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.min.css">
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.components.min.css">
</head>
<body>
<div id="contact_us">Contact us</div>
</body>
<script>
// Include the UserVoice JavaScript SDK (only needed once on a page)
UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/KIXLyRfZDu6MdnaaVtnlSw.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
UserVoice.push(['addTrigger', '#contact_us', {}]);
</script>
</body>
</html>
It works well under JSBin and Excel Online
, clicking on Contact us
shows the message window. However, under Excel 2016 for Windows
, after several seconds of loading (as expected), clicking Contact us
does not open such a window.
I don't know if there is something special we need to set up in Home.html
or the manifest file of the add-in, or the setting of Excel for Windows. I am also trying to change the position where the window is supposed to pop up (but still not yet works)... Could anyone help?
Edit 1
I test the code of Michael Saunders, it works under Excel Online, but still does not work in Excel for Windows. The follows is a screenshot. Note that, after clicking on Contact us
, the triangle symbol (in red) appeared (in my initial example, it has the same phenomena. And if we just click on the blank area of the task pane, it has the same phenomena too.)
Maybe the box is already shown, but not in an area of the task pane that we can see?