![]() |
|
#2
|
|||
|
|||
|
I created a macro with the following code to read through the first table and if there is an X, place data in the second table.
What I do not know how to do is have it run for all the documents that need to be changed/updated. Code:
Dim strClean As String
Dim oTbl As Table
Dim Row As Integer
Dim Col As Integer
Dim strCellText As String
Set oTbl = ActiveDocument.Tables(3)
For Row = 1 To oTbl.Rows.Count
For Col = 1 To oTbl.Columns.Count
strCellText = oTbl.Cell(Row, Col).Range.Text
strClean = Mid(strCellText, 1, Len(strCellText) - 2)
If Trim(strClean) = "X" Then
With ActiveDocument.Tables(4).Cell(2, 3).Range
.Text = "nailed it"
End With
End If
Next
Next
|
| Tags |
| 2010, auto populate |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Form auto fill based on a different field value.
|
stct | Word | 31 | 05-02-2024 04:48 PM |
| Auto fill drops down using VBA code based on selection | AgilityJS | Word VBA | 5 | 11-03-2015 07:50 PM |
| How to remove auto type entry | ep2002 | Excel | 19 | 11-06-2013 08:48 AM |
| Auto Entry Names etc Into Document | simonyglog | Word | 2 | 07-08-2010 10:22 AM |
Sequentail Number Each Row Based On Another Column Entry
|
KramerJ | Excel | 3 | 05-07-2009 11:35 PM |