![]() |
#6
|
||||
|
||||
![]()
I believe what's in the links (and other threads you could find with a search) are indeed relevant to your problem, but you don't understand it.
Try the following: Code:
Sub Demo() Application.ScreenUpdating = False Dim wdTbl As Table, wdCell As Cell, Rng1 As Range, Rng2 As Range With ActiveDocument For Each wdTbl In .Tables For Each wdCell In wdTbl.Range.Cells Set Rng1 = wdCell.Range Rng1.End = Rng1.End - 1 If Rng1.Font.Bold = True Then Set Rng2 = wdCell.Next.Range Rng2.End = Rng2.End - 1 Select Case Rng1.Text Case "Name": Rng2.InsertBefore "<name>": Rng2.InsertAfter "</name>" Case "ID.": Rng2.InsertBefore "<ID>": Rng2.InsertAfter "</ID>" Case Else End Select End If Next Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
DChord568 | Word Tables | 5 | 11-16-2012 01:36 PM |
![]() |
angalis428 | Word | 1 | 01-06-2012 01:12 PM |
![]() |
ripcurlksm | Word Tables | 2 | 09-09-2011 04:59 AM |
Copying tables to MS Word | 123 | Word Tables | 1 | 03-02-2011 11:25 AM |
Word tables | nbudd | Word Tables | 1 | 05-09-2010 06:31 AM |