Share via


SharePoint 2013: New Features in Word Automation Services

Introduction

Word Automation Services was provided by Microsoft in SharePoint 2010 and Office 2010. To Automate MSWord Base Bulk file Operations on Server. Operations which include Converting Documents from two different formats like doc and docx to pdf. And update table of contents, importing alternate format chunks. The Word Automation Service can be added to the farm from the Central Administration site, by adding a new "Word Automation Services" service application to the SharePoint farm service applications.

http://4.bp.blogspot.com/-w3I5YBd3E4Y/URJLrKvlCpI/AAAAAAAAPC8/Wak1AZnIFa4/s1600/create-new-service-application-in-sharepoint2013.jpg

The word automation service helps Developers to meet their business requirements for Server Side Automation of Microsoft word. In past Developers were used to Open XML Object Model to two Perform this kind of task which actually quite good but not highly scaleable. The Word Automation Service is Highly Optimised to perform huge Service Side Operations to provide significantly Great Performance for Solution. In SharePoint 2013 Microsoft improves allot in Word Automation Services major improvement are following.

http://4.bp.blogspot.com/-CAuwZWKgMxI/URJL4FlkrtI/AAAAAAAAPDE/5ZjHDXc9R3M/s320/IC598814.png

Word Automation Services 2013 architecture

On demand file operations In SharePoint 2013 now Developers can create on Demand file Operations on the server by using Word Automation Services. In Order to create on Demand file operations in SharePoint 2013 have to call request to Word Automation Services. These requests are based on the tradition Asynchronous Timer Job-based requests. Which are not based on SharePoint timer jobs. You can make on demand file conversion requests for only one file at a time. Word Automation Services in Microsoft SharePoint 2013, have the added option to create a file conversion request that’s processed As soon as you submit it and the conversion is started immediately and does not depend on the SharePoint Timer Job.

Stream Support

Word Automation Services now support streams in SharePoint 2013. In the Previous version of SharePoint 2010 Word Automation Services could convert only those files that were stored in SharePoint libraries. Now using Stream developer can store files outside of SharePoint.

Sample Code

//ConversionJob  2010
ConversionJob pdfJob = new  ConversionJob("W A S");
pdfJob.UserToken = myWebsite.CurrentUser.UserToken;
pdfJob.AddFile(outputFilename, outputFilename.Replace(".docx", ".pdf"));
//Will Start after invoking start Function
pdfJob.Start();

On Demand

SyncConverter syncConv = new  SyncConverter("W A S");
syncConv.Settings.OutputFormat = SaveFormat.PDF;
ConversionItemInfo convInfo = syncConv.Convert(inStream, outStream);

See Also

An important place to find a huge amount of SharePoint related articles is the TechNet Wiki itself. The best entry point is SharePoint Resources on the TechNet Wiki

References