{"id":304,"date":"2014-12-04T11:46:43","date_gmt":"2014-12-04T01:46:43","guid":{"rendered":"http:\/\/www.docx4java.org\/blog\/?p=304"},"modified":"2016-08-23T15:30:23","modified_gmt":"2016-08-23T05:30:23","slug":"docx4jhelper-word-addin","status":"publish","type":"post","link":"https:\/\/www.docx4java.org\/blog\/2014\/12\/docx4jhelper-word-addin\/","title":{"rendered":"Docx4jHelper Word AddIn"},"content":{"rendered":"<p>The dream:<\/p>\n<ul>\n<li>View Open XML right from within Word, and see what happens when you edit it.<\/li>\n<li>Or generate corresponding docx4j Java code, with deep links into the corresponding docx4j source code and Open XML spec.<\/li>\n<\/ul>\n<p>Regular users of docx4j will be aware of our webapp, which amongst other things, generates docx4j Java code for the specified Open XML in your sample docx\/pptx\/xlsx.<\/p>\n<p>The webapp is useful, but it has a few draw backs:<\/p>\n<ul>\n<li>you have to upload your docx\/pptx\/xlsx, which takes time<\/li>\n<li>if your docx\/pptx\/xlsx contains sensitive data, you probably want to remove that first<\/li>\n<li>the webapp might be down<\/li>\n<\/ul>\n<p>To address these issues, we&#8217;re now offering the code gen functionality as a Word AddIn.<\/p>\n<p>If you install the Word AddIn, this means you can now generate code without your docx leaving your computer.<\/p>\n<p>This is all feasible because <a href=\"http:\/\/www.docx4java.org\/blog\/2014\/09\/docx-to-pdf-in-c-net\/\">docx4j can run as a DLL in a .NET project<\/a>, thanks to IKVM!<\/p>\n<p><strong>Where to get it<\/strong><\/p>\n<p>You can <a href=\"http:\/\/www.plutext.com\/dn\/downloads\/1471929499139\/Docx4j_Helper_3-3-1-01.exe\">download the installer<\/a>.\u00a0 After you complete the landing form (using your corporate email address, not gmail etc), you&#8217;ll be sent a download link.<\/p>\n<p><strong>Getting Started<\/strong><\/p>\n<p>After a successful installation, after restarting Word, you should see a &#8220;Docx4j&#8221; menu, containing:<\/p>\n<p><strong><a href=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/ribbon_entries.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-306\" title=\"ribbon_entries\" src=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/ribbon_entries.png\" alt=\"\" width=\"231\" height=\"90\" \/><\/a><\/strong><\/p>\n<p>To generate code, first press the &#8220;Load Helper&#8221; button.<\/p>\n<p>You&#8217;ll see the following form:<\/p>\n<p><a href=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/load_helper.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-307\" title=\"load_helper\" src=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/load_helper.png\" alt=\"\" width=\"389\" height=\"216\" srcset=\"https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/load_helper.png 389w, https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/load_helper-300x166.png 300w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/a><\/p>\n<p>Its inviting you to start a local web server which will run the same code as the existing webapp. \u00a0Just choose a port you aren&#8217;t already using. \u00a0If for some reason you want to browse using Internet Explorer (as opposed to your default browser), check the box.<\/p>\n<p>It&#8217;ll take a little while to start the server; you&#8217;ll see a dialog when its started.<\/p>\n<p>Now you can generate code. \u00a0To do so, select something in your docx, then click the &#8220;Generate Code&#8221; button.<\/p>\n<p>After a while, a window will open in your web browser, and you&#8217;ll see:<\/p>\n<p><a href=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/web_browser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-308\" title=\"web_browser\" src=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/web_browser.png\" alt=\"\" width=\"760\" height=\"390\" srcset=\"https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/web_browser.png 760w, https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/web_browser-300x153.png 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>That&#8217;s the view of the docx package, which will be familiar if you&#8217;ve used the webapp. \u00a0 For how to generate code from here, see our <a href=\"\/blog\/2013\/05\/docx4jpptxxlsx-online-code-generation\/\">earlier post<\/a>.<\/p>\n<p>Code generating is done on your computer. \u00a0(But note, the links on that page to docx4j source code and the OpenXML spec are external links)<\/p>\n<p><strong>What about the &#8220;Edit OpenXML&#8221; button?<\/strong><\/p>\n<p>If you select something in your docx, then click that button, after a while (maybe 30 secs the first time!), you&#8217;ll see the corresponding XML in an editor window:<\/p>\n<p><a href=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/editor.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-309\" title=\"editor\" src=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/editor.png\" alt=\"\" width=\"863\" height=\"691\" srcset=\"https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/editor.png 863w, https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/editor-300x240.png 300w\" sizes=\"auto, (max-width: 863px) 100vw, 863px\" \/><\/a><\/p>\n<p>You can go ahead and edit it, then click the &#8220;Apply&#8221; button.<\/p>\n<p>If Word likes your XML, you&#8217;ll see your changes on the document surface. \u00a0Ctrl Z should work for undo.<\/p>\n<p><strong>So there are 2 ways to see the underlying XML<\/strong><\/p>\n<p><a href=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/both.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-310\" title=\"both\" src=\"http:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/both-300x171.png\" alt=\"\" width=\"300\" height=\"171\" srcset=\"https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/both-300x171.png 300w, https:\/\/www.docx4java.org\/blog\/wp-content\/uploads\/2014\/12\/both.png 1004w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The first way we described uses your web browser; the second is a Windows Form.<\/p>\n<p>These two views have different features; maybe a later release will unify them?<\/p>\n<p><strong>What about pptx, xlsx?<\/strong><\/p>\n<p>There&#8217;s no reason in principle we couldn&#8217;t make a similar AddIn for Powerpoint and Excel. \u00a0In fact, we plan to make these, once any teething issues have been ironed out in the WordAddIn.<\/p>\n<p>In the meantime, for pptx and xlsx, you can continue to use the webapp.<\/p>\n<p><strong>Help, Suggestions and other Discussion<\/strong><\/p>\n<p>If you are a Plutext customer experiencing an issue, please email support@plutext.com<\/p>\n<p>Otherwise, please check the <a href=\"http:\/\/www.docx4java.org\/forums\/docx4jhelper-addin-f30\/\">Docx4jHelper AddIn<\/a> forum.<\/p>\n<p>We&#8217;ve got some ideas for where the AddIn goes from here, but we&#8217;d love to hear yours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The dream: View Open XML right from within Word, and see what happens when you edit it. Or generate corresponding docx4j Java code, with deep links into the corresponding docx4j source code and Open XML spec. Regular users of docx4j will be aware of our webapp, which amongst other things, generates docx4j Java code for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,92,71,95,99],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-docx","category-docx4j","category-microsoft-word","category-ooxml","category-openxml"],"_links":{"self":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":6,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":408,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/posts\/304\/revisions\/408"}],"wp:attachment":[{"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.docx4java.org\/blog\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}