Document Table « Word « VBA / Excel / Access / Word






1.inserts a new, blank, non-autofitting table containing 10 rows and 5 columns at the current position of the insertion point in the active document:
2.Selecting a Table in the active document:
3.Declare the variable tempTable and then select the first table in the document named Log.doc and assign its Range object to tempTable
4.Selects the first table in the current selection:
5.Converts the current selection to a five-column table, separating the information at commas.
6.Making Sure the Selection Is within a Table
7.Finding Out Where the Selection Is in the Table
8.Adding a Column to a Table
9.Deleting a Column from a Table








10.Setting the Width of a Column
11.The SetWidth method sets the width of one or more columns and specify how the other columns in the table should change as a result: expression.SetWidth ColumnWidth, RulerStyle
12.The Width property lets you change the width of a column without worrying about the effect on the other columns. Specify the width you want in points-for example:
13.Selecting a Column
14.Adding a Row to a Table
15.Deleting a Row from a Table
16.Setting the Height of One or More Rows
17.Set the Height property of the row or rows in question by specifying the height in points
18.Selecting a Row
19.Inserting a Cell
20.Returning the Text within a Cell
21.Strip off the last two characters when assigning the Text property to a string:
22.Entering Text in a Cell
23.Deleting Cells
24.wdDeleteCellsEntireRow deletes the whole row.
25.wdDeleteCellsShiftLeft moves cells across to the left to fill the gap.
26.wdDeleteCellsShiftUp moves cells up to fill the gap.
27.Deletes the first cell in the first row of the first table in the active document and shifts the other cells in the first row to the left to fill the gap:
28.Selecting a Range of Cells
29.Converting a Table or Rows to Text
30.Use the ConvertToText method with a Table object, a Row object, or a Rows collection: converts only the first row of the selected table to tab-delimited text
31.Convert the first table in the document to text separated by paragraphs
32.wdEndOfRangeColumnNumber returns the number of the column in which the end of the selection or range falls.
33.delete the column in which the range testRange ends if the range is more than one column wide: