I am trying to build a task-pane add-in for word online which can do mail merge like desktop office. Now I understand that word online does not support mail merge out of the box, so I thought about the following steps -
Create a template (DOTX) using desktop office which will contain Region or something like a merge field etc. Upload the template to one drive.
Open a blank doc and add a task pane add-in in word online. This is temporary step for now.
Click a button on the add-in.
This click will stream the template (DOTX) from server using an app service call.
Render the stream into word online web page.
Edit and save.
Close word online and reopen.
Click the doc link.
This will render the doc in word online.
Add the add-in in the task pane (temp step).
Click edit button.
Call app service to fetch the latest merge data source.
Traverse through the word xml and replace the values corresponding to the region or special keys.
Re-render the doc.
My users will have E1 subscription of office 365.
Is this thought process logical and achievable with word online? Thanks in advance!...
I think your approach is much more complicated than it needs to be. Word Online supports Add-ins created using the JavaScript APIs, as supported by the information in this article: https://msdn.microsoft.com/EN-US/library/office/dn833104.aspx
It should be possible for you to create the "template" on the Desktop (Word 2013 or 2016 is required - but only 2016 supports the current full scope of the JS API) and "insert" your add-in, which links it to the document. Opening the document in Word online should automatically load the add-in, that can then link to the data source and fill in the data.
As data targets ("merge fields"), I recommend you use Content Controls.
Related
How can we add a custom option in "File Menu/Tab" by custom "Office Addin"?
I can find how to add "Control" in an office tab using "ExtensionPoint". But I am unable to find how can we add a custom option in "File Menu". Following are the documentation links I have gone through.
https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/extensionpoint
https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/officetab
image 1:
image 2:
The Backstage UI can't be customized with web add-ins. See Add-in commands for Excel, PowerPoint, and Word for more information about possible customizations.
Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .
FYI these customizations are possible using COM add-ins, so you may also consider creating a VSTO based add-in instead, see Walkthrough: Create your first VSTO Add-in for Outlook.
Is ther a way to update docvariable or docproperty of a Word document when opening in the Word online by the microsoft graph API or another API.
I do this in Word for desktop using C# code, but I need to do this in Word online too.
It can't be done in Word on-line. If you had an Office JS add-in you might be able to change document properties (but no DocProperty fields that reflect those values). The Word JS APIs do not access the Document Variables, however.
But you should be able to do it on the closed file (before it's opened in Word on-line, for example) by leveraging the Word Open XML file format. There are numerous libraries to work with it. Microsoft's is the Open XML SDK (free, as a .NET Framework / Visual Studio extension) which can access all content of Office files (except VBA binaries).
I need to implement Microsoft Word into my works website and I'm having real trouble trying to find any information about it. Is there a way to do this? I need mail merge functionality but I don't mind whether it just works with my website (database website)rather than being implemented into it
(I've used CKEditor and TinyMCE but neither are useful for my website/work. I need it to be simple and I'm working with people who just know basic Word)
I don't think you can embed (real) Microsoft Word editing functionality in an arbitrary website.
However, if you are running a Sharepoint server, then you can upload MS Word documents to Sharepoint and edit there them via a web browser via "word Web App". It also allows the user to "one click" download a document and edit it Word installed on their machine.
References:
Microsoft's Introduction to Word Web App
Alternatively, if you are prepared to look at 3rd-party solutions, some are listed in these Q&As:
Embed editable MS Word document on web page
Making Word document embedded in a web page editable or read-only
However, this is dangerously close to asking for a recommendation for software or a web-based service, and that is off-topic.
We are developing a Word Task Pane Office Add-in (not VSTO) for internal organization documents
In Word 2013 (desktop) when we insert the add-in and save the document, when we reopen that document the add-in is automatically loaded.
In Word Online, this behavior is different, the add-in doesn't get automatically loaded. The user has to manually insert the add-in every time the document is opened.
Is there a way to automatically load it in Word Online?
Would running our own Office Web App Server help?
Is there a way to load the add-in through a parameter? (maybe query string?)
Thanks
We have changed the behaviour you describe: starting in January, Word Online add-ins will be persisted in the document just like they are in Word for desktop. So #1 is not supported now but will be soon. Workarounds like #2 and #3 are not available now.
Thanks!
-Michael (Microsoft Program Manager for add-ins)
Thank you for posting this issue and giving us the opportunity to find a resolution. It looks like we are having a temporary issue at present where the Office Add-ins width is getting saved to 3 pixels. We are striving to find a resolution as soon as possible. In the mean time you can try the following workaround
Temporary workarounds:
1.Opening the file in excel client app and saving the file will fix the width issue because we have a minimum width set in excel client app.
2.open the file in open xml editor, locate \xl\webextensions\taskpanes.xml and edit 'width' property of entry to a greater value, say, 300.
After the file is edited in client or excel client, excel client respects the new value and it do NOT go back to value 3. The issue seems to be only repro with the add-ins inserted in excel WAC only.
We will update the article once it is fixed
Thanks,
Sky
Microsoft Program Manager.
We have an existing web application written in Java. We want to give our users the ability to open a Word document that is stored in our application on the server. So when the user downloads the document from our server, Word pops up and they then can edit this document on the client. Once finished editing the document we would like to give them the ability to save this document automatically back to the server where they retrieved it, by simply selecting on the Word Save icon. Similar to how SharePoint does it.
Seems to me SharePoint would be a good solution for this and they do it very well, but unfortunately we cannot use SharePoint in our architecture.
There also seems to be a lot of server-side possibilities that we can use to upload and open word documents from our server, I feel we can solve these use cases easily.
My big problem is the automatic saving of an edited document by the client back to our server where the document was downloaded
I am not Microsoft proficient to know what the best solution would be.
Should we write a Word AddIn to save to our server?
How do we get the Word AddIn into our users desktops?
Can we embed a Word AddIn into the Word document that is opened on the client?
1.Should we write a Word AddIn to save to our server?
If you don't want to use SharePoint you can develop an add-in where you can implement all the required functionality and much more.
2.How do we get the Word AddIn into our users desktops?
You can develop an installer for the add-in. See Deploying an Office Solution for more information. Also you can use the group policy objects for deploying the software automatically.
3.Can we embed a Word AddIn into the Word document that is opened on the client?
You can develop a document-level add-in, i.e. the code will be run for a specific document only. But you will need to install it as an application level add-in. See Architecture of Document-Level Customizations for more information.