ms-word

Docx4j export style from one .docx and use it in another .docx

纵饮孤独 提交于 2020-01-04 05:38:06
问题 I am creating new Word document with the code below: Tidy tidy = new Tidy(); tidy.setShowWarnings(true); tidy.setInputEncoding("UTF-8"); tidy.setOutputEncoding("UTF-8"); tidy.setXHTML(true); tidy.setMakeClean(true); tidy.setQuoteNbsp(false); WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage(); XHTMLImporterImpl XHTMLImporter = new XHTMLImporterImpl(wordMLPackage); for (Value v : res.getRules()) { System.out.println(v.toString()); ByteArrayOutputStream ou = new

SCORM Authoring Tools

不羁的心 提交于 2020-01-04 04:54:41
问题 I work for a company that converts operation and maintenance manuals and other information and media we find into online courses. Currently, we use Microsoft Word to create the courses because often times, there is a lot of information and it doesn't fit in PowerPoint slides so we need scrollbars to show the information. I have been searching for a new authoring tool that is SCORM compliant. I haven't been very successful in my search. Programs like Adobe Captivate will take a lot of time for

Split title in two lines in Rmarkdown for word output

百般思念 提交于 2020-01-03 17:47:29
问题 I have seen various solutions around which work for pdf and HTML document output. However, none worked for me for word output. When used | as suggested here: Split the title onto multiple lines? simply made the whole title disappear. Here is the code: --- title: | | Supporting Information | Development and mechanistic bla bla. author: Some people output: word_document: reference_docx: ACS SI style for RMD.docx mainfont: Arial --- <style> body { text-align: justify} p {line-height: 1.5em;} <

Split title in two lines in Rmarkdown for word output

*爱你&永不变心* 提交于 2020-01-03 17:47:06
问题 I have seen various solutions around which work for pdf and HTML document output. However, none worked for me for word output. When used | as suggested here: Split the title onto multiple lines? simply made the whole title disappear. Here is the code: --- title: | | Supporting Information | Development and mechanistic bla bla. author: Some people output: word_document: reference_docx: ACS SI style for RMD.docx mainfont: Arial --- <style> body { text-align: justify} p {line-height: 1.5em;} <

C# Export Excel Chart as object (not as picture) to Word

喜欢而已 提交于 2020-01-03 17:46:29
问题 I want to export an excel chart to Word as an object (Excel Chart), not as a picture. As picture is very easy with Chart.CopyPicture I´m using AddOleObject, but it gives an error about not being able to link the file. This is the code: Document doc; // Existing document string chartSheet = xlsFilePath + "!" + chartSheetName; string type = "Excel.Chart.8"; InlineShape shape = doc.Content.InlineShapes.AddOLEObject(ClassType: type, FileName: chartSheet, LinkToFile: false, DisplayAsIcon: false);

MS Word VBA - Finding a word and changing its style

心已入冬 提交于 2020-01-03 17:12:09
问题 I'm trying to find all instances of key words in a MS Word document and change their style. The key words are stored within an array and I want to change the style of the particular word only. Ideally this would happen as I type but that is not crucial. Attempt 1 - Based on recording a macro and changing the search term Sub Woohoo() Dim mykeywords mykeywords= Array("word1","word2","word3") For myword= LBound(mykeywords) To UBound(mykeywords) Selection.Find.ClearFormatting Selection.Find

Document Recovery

牧云@^-^@ 提交于 2020-01-03 17:00:31
问题 I am creating an automation solution for Word (2007). Sometimes I have to kill the Word process. Next time word is launched a tab/window appears suggesting to recover an unsaved document. I would like to either disable this or have my application close this window. I have no idea where the entry point to this tab/window is. EDIT: I've found out that word calls this "Feature" Repair, not Recover. Still no idea how to avoid/bypass/disable it. Suggestions? 回答1: This can be solved by deleting the

Alias for Microsoft.Office.Interop.Word namespace not recogized

拟墨画扇 提交于 2020-01-03 16:59:08
问题 Here is my code in Form1.vb: Imports Word = Microsoft.Office.Interop.Word Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Dim oWord As Word.Application Dim oWord1 As Microsoft.Office.Interop.Word.Application Dim oWord2 as Application I'm using VStudio2012 and Office 2010 and following the sample from https://support.microsoft.com/kb/316383 The declaration of oWord is flagged by intellisense as "Type 'Word

Alias for Microsoft.Office.Interop.Word namespace not recogized

别等时光非礼了梦想. 提交于 2020-01-03 16:58:44
问题 Here is my code in Form1.vb: Imports Word = Microsoft.Office.Interop.Word Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Dim oWord As Word.Application Dim oWord1 As Microsoft.Office.Interop.Word.Application Dim oWord2 as Application I'm using VStudio2012 and Office 2010 and following the sample from https://support.microsoft.com/kb/316383 The declaration of oWord is flagged by intellisense as "Type 'Word

How to convert an HTML document with lots of tables into a Word document?

半腔热情 提交于 2020-01-03 13:03:36
问题 I have created an HTML document with many tables. How can I convert the document to Word? The problem is that if I open an HTML document with Word, I get non-standard double-lines tables for some reason. <table border="1" color="#000000" cellpadding="0" cellspacing="0" width=100%> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> <tr> <td width = 15%>0</td> <td width = 15%>0</td> <td width = 40%>0</td> <td> - </td> </tr> </table> 回答1: Most simple solution: Open the HTML in a browser,