ms-word

Using interop.word ranges

你说的曾经没有我的故事 提交于 2019-12-25 18:12:03
问题 I'm having trouble figuring out how to work with word ranges. I have picture files that I am adding to a word file, but I can't figure out how to add text and tables in between the pictures. The structure I want is this: Text, table, picture. Then repeat. However, when I add text or tables, they all area added after the four pictures, which stay at the top of the file. I've been reading and I've figured out I need to use ranges to specify where you want to place the tables/text, but all the

create a new document from word template with multiple pages using documentformat.openxml

橙三吉。 提交于 2019-12-25 17:45:05
问题 I have a Microsoft Word template with some content controls. It contains a table of contents and some extra information. On the page, I have set some content controls where I would like to inject a new text from a RESTful service. If the RESTful service returns an array of data (objects), I need to replicate the information on each page based on the Word template. Any idea on how can I do that using the Open XML SDK ( DocumentFormat.OpenXml )? Edit: I found this post here, which is great, but

Unable to open word document from jenkins

心已入冬 提交于 2019-12-25 17:44:54
问题 I have one windows utility which opens word document, extract data out of it and generate another word document using that data. Now my problem is that this windows exe is working fine directly on command prompt, but if I call this exe through jenkins, i.e. build step "Execute windows batch command" it gives error, it is not able to open word document so utlity exists with error. I have tried other options also like calling exe from pom file, and from batch file. every time it gives me same

Microsoft Word VBA - Select table if cell contains specified string

大城市里の小女人 提交于 2019-12-25 16:55:29
问题 I'm having trouble creating a Microsoft-Word macro. Here's the macro that I'm working on. It successfully selects each individual table in a word document. Sub FindSpecificTables() Selection.WholeStory Dim iResponse As Integer Dim tTable As Table 'If any tables exist, loop through each table in collection. For Each tTable In ActiveDocument.Tables tTable.Select If response = vbNo Then Exit For 'User chose to leave search. Next MsgBox prompt:="Search Complete.", buttons:=vbInformation End Sub

Microsoft Word VBA - Select table if cell contains specified string

梦想的初衷 提交于 2019-12-25 16:55:03
问题 I'm having trouble creating a Microsoft-Word macro. Here's the macro that I'm working on. It successfully selects each individual table in a word document. Sub FindSpecificTables() Selection.WholeStory Dim iResponse As Integer Dim tTable As Table 'If any tables exist, loop through each table in collection. For Each tTable In ActiveDocument.Tables tTable.Select If response = vbNo Then Exit For 'User chose to leave search. Next MsgBox prompt:="Search Complete.", buttons:=vbInformation End Sub

Excel VBA to Open Multiple Word 2010 Documents and Determine if Checkboxes are Checked

眉间皱痕 提交于 2019-12-25 16:49:29
问题 I'm trying to create a report that analyzes multiple word documents in a folder and analyzes checkboxes in the document to determine if a set of tests passed or failed. I have code that loops through all documents in a folder, but I'm having a hard time determining how to determine if the boxes are checked. The first checkbox I'm trying to evaluate is tagged "PassCheckBox". I've found several articles with syntax on how to do this, but none seem to work with the way I'm iterating through the

Add Text Above MSWord Table Using VBS

微笑、不失礼 提交于 2019-12-25 14:30:01
问题 I am working on creating a signature in outlook using VBS to push to our users. The signature has tables in it so i can have a logo / user information side by side vs. the standard text on top of a logo. (Original table code found here: http://www.vbforums.com/showthread.php?526706-resolved-question-with-tables-in-vbscript-for-AD-signature) Below is a snipit of the code that writes to the doc file. The code sucessfully creates two coluns and puts whatever information i want into them. Is

I need to create a stopping condition for my program

拟墨画扇 提交于 2019-12-25 14:29:16
问题 I have a program that highlights all the words between a start and end point and loops through the extract to find the same conditions. Program works well, except it does not stop looping. I have to break the running program to stop it. can someone please help me write up a condition that says if the end is reached and the start and end condition don't to exist, to stop the program. Sub SomeSub1() Dim StartWord As String, EndWord As String Dim Find1stRange As range, FindEndRange As range Dim

Apache poi get table from text box

好久不见. 提交于 2019-12-25 10:39:37
问题 I'm using apache poi for iteration table in docx file. All works fine but if table in text box , my code don't see table - table.size() = 0 XWPFDocument doc = new XWPFDocument(new FileInputStream(fileName)); List<XWPFTable> table = doc.getTables(); for (XWPFTable xwpfTable : table) { List<XWPFTableRow> row = xwpfTable.getRows(); for (XWPFTableRow xwpfTableRow : row) { List<XWPFTableCell> cell = xwpfTableRow.getTableCells(); for (XWPFTableCell xwpfTableCell : cell) { if(xwpfTableCell != null){

Apache poi get table from text box

佐手、 提交于 2019-12-25 10:35:10
问题 I'm using apache poi for iteration table in docx file. All works fine but if table in text box , my code don't see table - table.size() = 0 XWPFDocument doc = new XWPFDocument(new FileInputStream(fileName)); List<XWPFTable> table = doc.getTables(); for (XWPFTable xwpfTable : table) { List<XWPFTableRow> row = xwpfTable.getRows(); for (XWPFTableRow xwpfTableRow : row) { List<XWPFTableCell> cell = xwpfTableRow.getTableCells(); for (XWPFTableCell xwpfTableCell : cell) { if(xwpfTableCell != null){