Replace:=wdReplaceAllįor Each para In ActiveDocument.Paragraphs 'Delete frame - contents remain unchanged 'loop through each frame starting at the end
I will insert the code here for your reference or if you have any suggestion it's really helpful. Here is an example for the output, this document was processed using this macros code but it make some mistakes. In each paragraph, the first word is the entry and the word that follow is the expression so the macros will build one table with two columns for the entry and the corresponding expression. It is like a dictionary with entry and Expression. This document was scanned and converted to text using OCR. Or does the macro have to process a batch of documents? If yes, would these documents contain more than just the information to go into the table? If yes, how does the macro recognize this information?Īnd in what document should the table be? Is the information to be appended "day to day" to a single table? Must a new table always be generated?Īttached here is an example for your reference. How will this information be coming? Is this something the user will select in a document, so the macro would work on a selection? Or would this be a single document with many "entries" for the table? (If yes, does an entry always end with a new Or does the information for the second column always end with the first "." (period) character? Is it certain that the information to go in the second column will always be a single word - alphanumeric characters with no space? So the first space encountered would be the signal to end the second column? The options are endless.I'm afraid you don't give us enough information to infer a reliable pattern. All of the buttons and groups on the Home tab are available for formatting tables as well as documents. If the formatting feature you need is not on the Shortcut menu (which is fairly limited), click the Home Tab and select the features you need from the Font or Paragraph group. Right-click anywhere inside the table, and this small menu pops up adjacent to the longer Table Options menu. If you want to change the font or customize the paragraphs inside the table, use the Format Shortcut menu. Select Table Tools > Design > Table Styles, then scroll through the gallery of styles. The table below uses one of the many preset styles that comes with Word. Make your table pop with Table Styles, Shading, Border Styles, Borders, or Border Painter. Click the down arrow in the field box under Art, then choose a border-mostly simple clip art-from the list. Select Table Tools > Design > Borders > Border Painter, and click the Page Border tab in the Borders and Shading dialog box. There’s also an option to add artwork borders to your pages. If you don’t like a feature you’ve added, just click the Undo button or press CTRL-Z. There’s no learning curve, just play with the features and see what happens. Highlight your table, then select Table Tools > Design> Table Styles, Shading, Border Styles, Borders, or Border Painter (see the graphic below for ideas). The Design tab is for adding borders, shading, styles, and customizing the header columns and rows.
Wrap text around a table, change cell margins, convert table back to text, sort the table data, and/or add formulas. Review the Formula Format table in the graphic below for the correct commands that tell Word which direction to calculate (these go inside the parentheses).
Word calculates the column of numbers and places the calculation in the target cell (where your cursor resides). Type Above between the parentheses, choose a format under Number Format such as dollars, percent, or general, then click OK. If you are unfamiliar with the formulas Word provides, click the down arrow under the Paste Function field, and choose a formula from the list. In the Formula dialog box type the SUM() formula in the Formula field box.
To calculate the total salaries, position your cursor in the last row and the last column cell, and click the Formula button under the Data group.
I added a Salary column to the table below and entered some dollars, plus a new row at the bottom for the salary totals. You can even insert formulas to calculate your numeric data. Just choose the separator you prefer, so when the table grid disappears, the data isn’t all jumbled together. You can also convert your table back to a text block. For example, you can sort by Last Name, then by First Name. You can sort by column numbers or by column headers, and it provides two sort levels. With the table still highlighted, click Table Tools > Layout > Data > Sort to sort the table data alphabetically or numerically, just like in Excel. Select Cell Margins to change the margins inside each cell. Other features include Table Properties, which provides several options for aligning the table with the text or wrapping text around your table. Menu options to modify a table structure.