I'm building an (JS based) add-in for Word and it seems that I'm somehow unable to properly load (or actually, initialize) the office.js library when using the add-in in Word, both online as well as the desktop clients. I cannot execute any functions related to the office.js.
I've done some debugging and I found out that the sample projects work just fine, based on that finding I removed Angular from my add-in and it works fine that way. I load the office.js in exactly the same way in both the projects with and without angular. Is there a known incompatibility between Angular and Office add-ins? I haven't been able to find anything on this.
Actually there is a common error that I, and others, have come across several times when building angular apps in the context of an Office add-in. The office.js initialize function is there to set-up the communication between the add-in frame and the Office host application. If the office.js does not respond to the host application within 5 seconds after loading the add-in, it will fail. In this case, what happens often is that the office.js is loaded after (or by) angular, by then the 5 seconds are gone. What you should do is bootstrap angular in your office initialize. A more elaborate explanation and a guide on how to do this can be found here: https://www.itunity.com/article/building-excel-2016-addin-angular-enhanced-officejs-2637
Related
We already developed Excel add-in using officejs with RESTful api with Batching in custom Functions.
And we wanted to achieve same in Word add-in hence kindly share example using word add-in with RESTful api.
As I understand it, you have a web API (REST architecture) and you have successfully made calls to it from an Excel custom function. Now you want to make calls to a web API from a task pane Word add-in. You should be able to do this exactly the same way that you do in the custom function. In fact, to start with, you should use the exact calling code and get the exact same data. The difference is only in the UI. You will probably want the calling code triggered by an event handler for a button in the task pane.
As per my knowledge, you need word manifest.xml file then all your business logic you can write using differences your addin by running inside excel or word
So officejs provide Host info to check running platform
I guess it will help
I am trying to build a Powerpoint Addin using the new JS-based stack that Microsoft has introduced. As part of the development, I am evaluating the support that the current JS libraries are providing. While VSTO/COM-based plugins have been around for quite some time, lack of cross-platform support is a challenge(especially for Mac and now Web), which is also the reason I want to opt for Web-based Addin(JS). But Powerpoint doesn't have a HOST API as Excel or Word does which makes things slightly challenging.
Thus here are the capabilities I want to have from the JS stack -
Ability to add and change the properties of shapes. While adding a shape doesn't have a specific API function, I was able to add it as an SVG object. Is there an easier way to change the properties of shapes and
Adding links to shapes to different slides.
Initiating other office apps like Excel and the ability to edit/read data from those instances.
Apply Slide Transitions.
Ability to connect other data resources through a URI.
Store state of shapes and slides.
It would be great if someone can point to the appropriate sections of the documentation which might help me find answers to this.
Most of what you are requesting cannot yet be done in a PowerPoint Web Add-in. But you can so some of it; for example, "connect to other data sources through a URI". I recommend that you look through the Develop section of the documentation.
For VSTO I have a provision to call it based on demand from my host application. Where as for web addin it is globally installed in server so it will be reflected if I open any word document. I want the addin to be activated programmatically from my host application(.Net/C# MVC). Please suggest how can I achieve this.
This isn't possible with Office Web Add-ins currently. Please go to Office Developer Voice and search to see if this idea has been suggested. If it has, vote for it. If it hasn't, make the suggestion.
Hopefully someone can help me, I'm new to EPiServer and have been given a data migration task. We are using the latest version 8.5. I need to migrate content from a clients home grown CMS (that luckily is in a tree like structure) to EPiServer. There doesn't seem to be a whole lot of information about this on the web - perhaps I just don't know the right thing to search for.
It looks like using the EPiServer.ServiceApi might be the route to go but again locating useful documentation is proving difficult.
I was thinking of setting up the client CMS in SQL Server and writing a simple console application to call the EPiServer.ServiceApi inserting the content. If anyone has any information on this or better still and example i would be very grateful.
Thanks,
Dan
If you are just importing content from another CMS I would write a scheduled job in EPiServer:
http://world.episerver.com/code/dannymurphy/Stoppable-Scheduled-Job-with-feedback/
That job then uses the standard IContentRepository to create content:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Persisting-IContent-instances/
That way you can run it whenever you want and have access to EPiServers complete API. Also you can see progress of the import through the job status.
In the job you can read the content as a file in any format you like or directly from the source CMS database or some xml or RSS feed perhaps.
I have moved content from PHP, Java and .NET CMS this way. In .NET you could even access the source CMS via WCF or SOAP if available.
The ServiceApi is relatively new and more focused on Commerce products and media assets rather than CMS page and block content so I wouldn't use that.
There is complete documentation below for the ServiceApi by the way, did you not find it?
http://world.episerver.com/documentation/Items/EPiServer-Service-API/
Regarding language management you can read more in the below links:
http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/
http://tedgustaf.com/blog/2010/5/create-a-new-page-language-branch-programmatically-in-episerver/
Basically you have two options for multiple languages. If the content is just straight translations you should create nine different language versions (branches) of the same page. You can also have multiple sites in an EPiServer installation but that requires 9 separate licenses (and the associated costs).
I've done a lot of EpiServer content migration projects. The easiest way if it's possible is to export your current sites tree in Json and then import that into EpiServer. I've had to do it on a recent project and mixed with Json.net it's pretty easy.
If you want to go that route you can find all the code to do it here: EpiServer Content Migration With Json.Net/
I have office 2007 installed on the windows 7 platform.
In the Word application exists our supplier's add-in that catches BeforeClose document event and asks customer the question before exitting.
Now, I developed MY custom add-in that also catches BeforeClose document event and performs some operation.
The question is: HOW can I control, which of the "catching" will perform FIRST and which SECOND?
I need that MY add-in will work first and the supplier code will work after me, before the documnet will closed.
Thanks a lot in advance,
Milo
The only thing I can see would be the loading order of the addins. You might need to "name" your addin file so it loads first (not sure there is another way), then check if it effectively triggers first on all you system configurations.