ms-word

Replacing a text in Apache POI XWPF

↘锁芯ラ 提交于 2020-01-18 11:35:31
问题 I just found Apache POI library very useful for editing Word files using Java. Specifically, I want to edit a DOCX file using Apache POI's XWPF classes. I found no proper method / documentation following which I could do this. Can somebody please explain in steps, how to replace some text in a DOCX file. ** The text may be in a line / paragraph or in a table row/column Thanks in Advance :) 回答1: The method you need is XWPFRun.setText(String). Simply work your way through the file until you

How to Edit a Read-Only Word Document (VBA)

匆匆过客 提交于 2020-01-17 08:37:47
问题 I am periodically getting Word documents from various clients and sometimes they send them to me in 'Read-Only' mode. While it isn't a big deal to go to 'View > Edit Document' manually, I cannot seem to find how to do this within my VBA code. Either opening a document as editable or toggling it as editable once it is open would be sufficient for my needs. Note that I cannot open the document with 'readOnly = false' as it looks like it is set to 'readOnly recommended' (based on my reading of

How to Edit a Read-Only Word Document (VBA)

谁说胖子不能爱 提交于 2020-01-17 08:37:08
问题 I am periodically getting Word documents from various clients and sometimes they send them to me in 'Read-Only' mode. While it isn't a big deal to go to 'View > Edit Document' manually, I cannot seem to find how to do this within my VBA code. Either opening a document as editable or toggling it as editable once it is open would be sufficient for my needs. Note that I cannot open the document with 'readOnly = false' as it looks like it is set to 'readOnly recommended' (based on my reading of

Intermittent Error (System.TypeInitializationException: Type constructor threw an exception ) passing data to word addin from wpf app

我的未来我决定 提交于 2020-01-17 08:30:33
问题 WE have a WPF application which will launch a word and then pass some information to a VSTO Application addin. I have written the code as has been explained here We defined the interface and the implemtation as follows [ComVisible(true)] [Guid("B523844E-1A41-4118-A0F0-FDFA7BCD77C9")] [InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IBridge { /// <summary> /// Loads a task /// </summary> /// <returns> </returns> string Load(SomeDTO dataTransferObject); } [ComVisible(true)]

Select a all tables within table using Word Macro

走远了吗. 提交于 2020-01-17 07:25:35
问题 I have these documents that I get regularly that I have to format and all the data is stored within tables that reside inside larger tables for layout purposes. I'd like to style the column widths of the tables within tables if it's possible with a macro? 回答1: You can reference the nested tables directly. With the following command you get the number of tables contained in the first table in the document. Debug.Print ThisDocument.Tables(1).Tables.Count You can then loop through them and

What are the RGB or HEX values of the default theme colors in Microsoft Word 2010?

戏子无情 提交于 2020-01-17 07:09:14
问题 I need to capture the color values for the scheme colors (i.e. accent1, accent2,....) in a Microsoft Word 2010 document. I have tried searching on the internet a lot but couldn't find any answer. Can any one help me with the reference for these colors? 回答1: Though i didn't get any answers for my question but I eventually found the answer and thought the share it for others' use. The theme color references can be found in the word/theme/theme1.xml file, however these references can not be

What are the RGB or HEX values of the default theme colors in Microsoft Word 2010?

邮差的信 提交于 2020-01-17 07:07:58
问题 I need to capture the color values for the scheme colors (i.e. accent1, accent2,....) in a Microsoft Word 2010 document. I have tried searching on the internet a lot but couldn't find any answer. Can any one help me with the reference for these colors? 回答1: Though i didn't get any answers for my question but I eventually found the answer and thought the share it for others' use. The theme color references can be found in the word/theme/theme1.xml file, however these references can not be

Word addin doesn't work on word online

回眸只為那壹抹淺笑 提交于 2020-01-17 06:14:29
问题 Developing a Word addin were you can pick a docx-file and it gets inserted in the new blank document - a templateHandler sort of. Every docx-file has a footer that is containing several RTF - contentControlers. Before a document is loaded (insertFileFromBase64) there is a thisDocument.body.clear() in the code. In local wordclient there is no problem to load the different docs, but in word online I get an error regarding body.clear() : The action is not supported with Word Online EDIT: The

Why does a Word 2016 Add-in (office.js) Ribbon Tab not show for some Mac users?

一笑奈何 提交于 2020-01-17 06:12:10
问题 The following manifest was approved by Microsoft and is in the Office Store as an add-in for Word 2016 called "Annotate PRO." The manifest should create a new ribbon named 'Annotate.' It does this correctly in Windows, Word Online (Windows and Mac, Chrome and Safari), and on some Macs. On most Macs (especially El Capitan) it does not create a Ribbon although the Add-in does work. You just have to choose it from 'My Add-ins' every time you open a document. It does not appear on many Macs. Why?

Why does a Word 2016 Add-in (office.js) Ribbon Tab not show for some Mac users?

孤街醉人 提交于 2020-01-17 06:11:08
问题 The following manifest was approved by Microsoft and is in the Office Store as an add-in for Word 2016 called "Annotate PRO." The manifest should create a new ribbon named 'Annotate.' It does this correctly in Windows, Word Online (Windows and Mac, Chrome and Safari), and on some Macs. On most Macs (especially El Capitan) it does not create a Ribbon although the Add-in does work. You just have to choose it from 'My Add-ins' every time you open a document. It does not appear on many Macs. Why?