ms-word

Android Apache POI error when reading Microsoft Word document: org.apache.xmlbeans.SchemaTypeLoaderException Cannot resolve type for handle

核能气质少年 提交于 2020-02-25 02:21:26
问题 I am trying to use Apache POI in my Android application so that I can read Microsoft Word files. I am integrating the POIA library which enables Apache POI usage on Android (https://github.com/SUPERCILEX/poi-android). However, when I run my code and read in a Word file, I receive the following error: Exception: org.apache.xmlbeans.SchemaTypeLoaderException: Cannot resolve type for handle _XY_Q=space|R=space Below is my code (I am receiving error on the first line): var document = XWPFDocument

Find words with more than one capital letter in word/VBA

喜夏-厌秋 提交于 2020-02-23 21:59:13
问题 I have a piece of VBA code that uses Find to find all the acronyms in a document. It does this by searching for all words consisting of capital letters that are 2 or more characters long using... <[A-Z]{2,}> The problem with this is it doesn't pick up all the acronyms, such as CoP, W3C, DVDs and CD-ROM. It picks up hyphenated acronyms in two parts which are not ideal but allowable as the list is checked by a user. I can also pick up words that end with an "s" or other characters by not

Previewing .doc, .docx in C# Windows Forms [closed]

拟墨画扇 提交于 2020-02-23 12:41:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm developing a windows forms project in c#. For now I can preview .PDF files with WebBrowser tool in ToolBox but that doesn't preview .DOC or .DOCX; instead it opens up a prompt ask either you want to save it or open in just like IE does. Now what I want is simply a preview of a .DOC or .DOCX. I tried this

Previewing .doc, .docx in C# Windows Forms [closed]

≯℡__Kan透↙ 提交于 2020-02-23 12:41:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm developing a windows forms project in c#. For now I can preview .PDF files with WebBrowser tool in ToolBox but that doesn't preview .DOC or .DOCX; instead it opens up a prompt ask either you want to save it or open in just like IE does. Now what I want is simply a preview of a .DOC or .DOCX. I tried this

import folder of .txt files into word document

我与影子孤独终老i 提交于 2020-02-23 04:09:52
问题 I've found a lot on importing folder of .txt files into excel, but not many on importing .txt files into word. I'm trying to get my macro to open all .txt files in a specific folder and import them into a single word document, with each .txt file having its own page. This is the code I have so far (that I found online): Sub AllFilesInFolder() Dim myFolder As String, myFile As String myFolder = Application.FileDialog(msoFileDialogFolderPicker) With Application.FileDialog

C# convert .doc to .htm

北城余情 提交于 2020-02-15 08:15:31
问题 I am trying to convert .doc file to .htm format to view in an ASP.NET MVC page. I am using the following code in C# : using Microsoft.Office.Core; using Microsoft.Office.Interop.Word; .... Microsoft.Office.Interop.Word.Application objWord = new Microsoft.Office.Interop.Word.Application(); object source = @"C:\Users\XYZ\Desktop\ScreenShot.doc"; object target = @"C:\Users\XYZ\Desktop\ScreenShot.html"; object unknown = Type.Missing; objWord.Documents.Open(ref source, ref unknown, ref unknown,

C# convert .doc to .htm

帅比萌擦擦* 提交于 2020-02-15 08:15:16
问题 I am trying to convert .doc file to .htm format to view in an ASP.NET MVC page. I am using the following code in C# : using Microsoft.Office.Core; using Microsoft.Office.Interop.Word; .... Microsoft.Office.Interop.Word.Application objWord = new Microsoft.Office.Interop.Word.Application(); object source = @"C:\Users\XYZ\Desktop\ScreenShot.doc"; object target = @"C:\Users\XYZ\Desktop\ScreenShot.html"; object unknown = Type.Missing; objWord.Documents.Open(ref source, ref unknown, ref unknown,

Word VBA: Replace the space at the end of a line if the preceding character is a digit

本小妞迷上赌 提交于 2020-02-08 10:24:40
问题 I've found this similar issue here, but I don't know how to make it work for what I need. I need to replace the space ( " " ) at the end of a line if it's preceded by a digit ( "[0-9]" ). Replacement text will be a non-breaking space ( "^s" ). So for example, throughout my document I might have dates written in this format "24 September 2019", phone numbers, phrases like "in 8 days" etc. I need to ensure the line doesn't break between the digit and the following word, hence replacing the

Generate a document template from a library of content blocks

假如想象 提交于 2020-02-08 10:20:10
问题 My company has a collection of Word templates for different types of quotes. There are three main types, with the "firm quote" being the most detailed. Each of these templates follows the same general outline and is populated with the same boilerplate, with a few differences from one document to another. Within the firm quote category, there are more boilerplate sections that can be added depending on the product being quoted. What I would really like to do is create a library or database

MS Word Caption with the Image Name

孤人 提交于 2020-02-07 02:27:25
问题 The code below works like a charm. It allows the user to pick a folder with .jpgs and other image types into a 2 image per page. The Current code just captions the image as "Picture". What I am needing assistance with is getting the image name as caption minus the .jpg. Any direction would be great: Sub AddPic() Dim fd As FileDialog Dim oTbl As Table Dim oILS As InlineShape Dim vrtSelectedItem As Variant ''''''''''''''' 'Add a 1 row 2 column table to take the images ''''''''''''''' Set oTbl =