![]() |
#2
|
||||
|
||||
![]()
There is no code in your template, however
Code:
Sub Macro1() Dim oTable As Table Dim oCell As Cell Dim oRow As Row Dim oPara As Paragraph Dim oRng As Range Set oTable = Selection.Tables(1) For Each oRow In oTable.Rows Set oCell = oRow.Cells(2) oCell.Range.Font.Size = 11 For Each oPara In oCell.Range.Paragraphs Set oRng = oPara.Range oRng.Collapse (1) oRng.MoveEndUntil "/" oRng.Font.Bold = True oRng.Font.Size = 14 oRng.Collapse (0) oRng.Start = oRng.Start + 1 oRng.MoveEndUntil "/" If InStr(1, oRng.Text, "VST") > 0 Or _ InStr(1, oRng.Text, "PKG") > 0 Then oRng.Start = oRng.Start - 1 oRng.Font.Bold = True oRng.Font.Size = 14 End If Next oPara Next oRow Set oTable = Nothing Set oCell = Nothing Set oRow = Nothing Set oPara = Nothing Set oRng = Nothing End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
petitfleur | Word VBA | 6 | 02-12-2020 10:40 PM |
Find a text and delete the line above | Dzib | Word VBA | 1 | 09-10-2019 12:27 PM |
![]() |
ScottA | Excel Programming | 3 | 05-06-2014 12:49 PM |
![]() |
paulkaye | Word | 4 | 12-06-2011 11:05 PM |
![]() |
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |