Umbraco Import from Word using Aspose.Words

The Umbraco Import from Words allows user to get contents from the Words most popular formats(doc/docx). This macro make it easy to get from Word file on any location either MS Word is not available and displayed them online.It adds a simple file browser control and Import from Word button, by clicking on Import from Word you can get your document contents online displayed on screen. Below are few screenshots to show hows it work.




How to install and use Import from Word macro?

Please check our blog post for more details http://www.aspose.com/blogs/aspose-products/aspose-total-product-family/archive/2014/02/19/import-contents-from-word-and-pdf-files-to-umbraco-sites.html

Sample Code

Below the Codebehind Import from Word:
            if (FU_Doc.HasFile)
            {
                // Check for license and apply if exists
                string licenseFile = Server.MapPath("~/App_Data/Aspose.Total.lic");
                if (File.Exists(licenseFile))
                {
                    License license = new License();
                   license.SetLicense(licenseFile);
                }
                Stream stream = FU_Doc.FileContent;
                Document doc = new Document(stream);
                doc.Save(FU_Doc.FileName, SaveFormat.Html);
                string outputText = File.ReadAllText(FU_Doc.FileName);
                    div_display.InnerHtml = outputText;
                
            }
            else
            {
                LBL_Error.Text = "Please Upload File";
            }

Video

Please check the video to see this macro in action.

Download

* Sample Code

Last edited Mar 1, 2014 at 12:55 PM by asposemarketplace, version 14