Error Loading Word Add-in Eventually Works After Retry & Start - office-addins

My add-in loads properly with Word on Windows, but shows loading errors through Word Online (tested with Chrome, Firefox & Edge) even though clicking through the prompt buttons eventually loads the add-in and everything works as expected. This is what I am seeing in the add-in just loading a usage page (https://office.flexxlegal.com/Home/Usage):
Page loads in the taskpane with a grey overlay & loading animation
Receive Add-in Error message - Something went wrong and we couldn't start this add-in. Please try again later or contact your system administrator.
Click the Retry button
Page is displayed again in the taskpane with the overlay and loading animation
Receive Add-in Error message - This add-in may not load properly, but you can still try to start it.
Click the Start button
The page loads and everything works as expected
Here are the parts of the app manifest related to his control:
<Control xsi:type="Button" id="Flexx.Help">
<Label resid="Flexx.Help.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Flexx.Help.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Flexx.Help.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Flexx.qicon_16x16" />
<bt:Image size="32" resid="Flexx.qicon_32x32" />
<bt:Image size="80" resid="Flexx.qicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>FLTaskPane</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Flexx.Help.Url" />
</Action>
</Control>
<Resources>
<bt:Images>
<bt:Image id="Flexx.qicon_16x16" DefaultValue="https://office.flexxlegal.com/assets/img/Q16.png" />
<bt:Image id="Flexx.qicon_32x32" DefaultValue="https://office.flexxlegal.com/assets/img/Q32.png" />
<bt:Image id="Flexx.qicon_80x80" DefaultValue="https://office.flexxlegal.com/assets/img/Q80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Flexx.Help.Url" DefaultValue="https://office.flexxlegal.com/Home/Usage" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Flexx.Help.Label" DefaultValue="Getting Started" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Flexx.Help.Tooltip" DefaultValue="Click to view usage information to get started with this FlexxLegal add-in." />
</bt:LongStrings>
</Resources>
With the webpage being loaded there is no code-behind, no javascript, just a static HTML page. Any insight into what the issue might be, or how I would go about determining the issue?
Thanks,
Ryan

With the webpage being loaded there is no code-behind, no javascript, just a static HTML page
This is your issue. Your add-in's pages must reference the office.js library and include an Office.initialize handler.
I suggest reviewing the documentation for instructions on how Office Web Add-ins work: Understanding the JavaScript API for Office.

Related

Xamarin forms ToolbarItems WPF secondary

I have this code to set up toolbar items in XAML.
<ContentPage.ToolbarItems>
<ToolbarItem Name="Menu1" Activated="OnClick" Order="Primary" Priority="{StaticResource Priority1}" />
<ToolbarItem Name="Menu2" Activated="OnClick" Order="Secondary" Priority="{StaticResource Priority2}" />
</ContentPage.ToolbarItems>
The rendering is fine in Android , but in WPF I see an ugly square icon (is a placeholder for a missing icon?)
Any ideas?
WPF render example
Android render example
Try adding an icon for the Toolbaritem in the Assets folder.
Also, try updating the Xamarin.Forms version - with version 3.3.0.967583 I can not observe placeholder icons.
Please note that the Name and Activated properties are obsolete - use Text and Clicked, respectively:
<ToolbarItem Text="Menu1"
Icon="{OnPlatform WPF=Assets/menu1.png}"
Order="Primary"
Clicked="OnToolbarItemClicked" />
<ToolbarItem Text="Menu2"
Icon="{OnPlatform WPF=Assets/menu2.png}"
Order="Secondary"
Clicked="OnToolbarItemClicked" />

how to refresh browser from Silverlight app located inside of a child aspx page

I know there are methods to refresh the browser page from silverlight
like HtmlPage.Window.Navigate(HtmlPage.Document.DocumentUri); OR
System.Windows.Browser.HtmlPage.Document.Submit();
And these work fine when the container page use the total space in the page,
but what about when my silverlight app is located on a child page that belong to a some kind of master page? i.e. In the code bellow I have a page called Application.aspx that have three sections (main.aspx is where my silvelight app is located).
<frameset >
<frame id=frameTitle name=frameTitle src="title.aspx" noResize scrolling="no" frameborder="no" height="75" />
<frame name="frameSpacer" id="frameSpacer" src="spacer.aspx" noresize scrolling="no" marginwidth="0" marginheight="0"/>
<frame id="frameMain" name="frameMain" src="main.aspx" noResize scrolling=no frameborder="no" />
</frameset>
How can I refresh Application.aspx and not just Main.aspx (when i use Document.Submit() i got a partial refresh for main.aspx)? using other method?
Thank you in advance.
Solution: from the container aspx page we need to add a js function:
function reload() {
window.parent.location.reload(true);
}
from silverlight: we need to add a call to the js function "reload"
HtmlPage.Window.Invoke("reload");

Launch app on exit checkbox need to be checked by default

We customized the WIX Installer UI.
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
......
<CustomAction Id="StartAppOnExit" FileKey="AdminAppExe" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait" />
<Property Id="LAUNCHAPPONEXIT" Value="1"/>
<Control Id="LAUNCHAPPONEXIT" Type="CheckBox" X="10" Y="243" Width="170" Height="17" Property="StartAppOnExit" Hidden="yes" CheckBoxValue="1" Text=" Launch App?">
<Condition Action="show">NOT Installed</Condition>
</Control>
.....
</Wix>
But the Checkbox to Launch app is not enabled by default? Pls let me know what i am doing wrong!
You're setting the property LAUNCHAPPONEXIT, presumably to check the box by default. However the Control is using a different property - StartAppOnExit.
You'll need to set the value of the property that the checkbox is using, or change the checkbox to use the property that you are setting.

implement imapbuilder in cakephp

I have created a web page using cakephp. Now I feel like my boring map on the main page is killing it. I bought imapbuilder which lets you do flash effects on images, however I don't seem to be able to get the code working.
Here is the code I pasted in my home page, but it won't load. All I see is a blank square.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"
width="800" height="747" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="imapbuilder/loader.swf" />
<param name="base" value="imapbuilder/" />
<param name="flashvars" value="datasource=urlife_map.xml" />
<param name="loop" value="false" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src="imapbuilder/loader.swf" base="imapbuilder/" flashvars="datasource=urlife_map.xml" loop="false" menu="true" quality="best" wmode="transparent" bgcolor="#ffffff" width="800" height="747" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
This same code I pasted into a separate file and it worked. I kept the folder imapbuilder on the same directory as the home page file.
Does anyone have an idea why this won't load and work on my website?
Files can only be accessed if they are located inside the webroot directory of your app using a standard CakePHP setup.
I suggest you move the imapbuilder folder to the webroot folder and also append all references to it with a / (e.g. /imapbuilder/loader.swf instead of just imapbuilder/loader.swf).
I think an easier solution for you is to use iMapBuilder.net -- which is the online version of iMapbuilder. The map will then be remotely hosted on their server, and all you need to do is copy and paste their code so that no file copying / directory issues.
I have used imapbuilder.net on few CMS based sites, e.g. dotnetnuke and wordpress. And the online based map solution is a lot easier than their Windows version, at least for CMS based sites.

Embedding Flash on Master Page

My client request a flash header for his website. I'm using asp.net and a master page (where the code for the flash header is). My problem is that whenever I go to a page that's not in the website's root, the flash doesn't appear. I've had the same issue with pure css menus on this site...
Here's the code:
<div id="header">
<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="App_Themes/Default/banner1.swf" width="1000" height="400">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="1000" height="400">
<param name="movie" value="App_Themes/Default/banner1.swf" />
<embed src="App_Themes/Default/banner1.swf" width="1000" height="400"></embed>
<!--><!--dgx-->
<param name="loop" value="true" />
<param name="menu" value="false" />
<p></p>
</object>
<!-- <![endif]-->
</div>
As you can see, I'm not calling the path to the flash object relative to the website root (in case this isn't clear... if it were an asp.net control, I'd use ~/App_Themes/Default/banner1.swf")
The flash object is being loaded relative to the location of the current page that's being viewed on the website. Assuming an indeterminate folder depth from root, how can I change the code to load the flash relative to the root, rather than the current page?
I have considered changing the path that's being used by perpending / or ~/ to it, but this only results in the flash not loading on any page at all.
Looking at the source code, the server modifies /App_Themes/Default/banner1.swf to ~/App_Themes/Default/banner1.swf
Sticking a ~/ in a plain URL won't work. Try using this:
<object type="application/x-shockwave-flash"
data="<%=ResolveUrl('~/App_Themes/Default/banner1.swf')%>"
width="1000" height="400">

Resources