![]() |
|
#2
|
||||
|
||||
|
Try something based on:
Code:
Sub Demo()
Dim i As Long, StrTxt As String
With ActiveDocument.Tables(1)
For i = .Rows.Count To 1 Step -1
If InStr(.Cell(i, 2).Range.Text, "Ensure S") = 1 Then
StrTxt = Split(.Cell(i, 2).Range.Text, " ")(1)
.Rows.Add BeforeRow:=.Rows(i)
With .Rows(i)
.Cells.Merge
.Shading.BackgroundPatternColor = -603930625
.Range.Style = wdStyleNormal
.Range.Text = "Step " & StrTxt
End With
End If
Next
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Text position in merged table cells - word 2010
|
ellentk | Word Tables | 3 | 09-09-2015 03:33 PM |
inserting wordwrap table causes paragraph break in text
|
sodiumkpump | Word Tables | 1 | 08-05-2015 06:36 PM |
Table will not allow sorting because "cells are merged". I can't find the merged cells.
|
wendyloooo | Word Tables | 1 | 05-26-2015 01:19 PM |
| Inserting Images into a Table Cell without Moving the Text | suzan | Word | 0 | 06-27-2014 05:20 AM |
programmatically inserting hidden text into a Word 2010 table
|
epid011 | Word VBA | 16 | 12-30-2013 11:29 AM |