Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-09-2022, 06:31 AM
gmayor's Avatar
gmayor gmayor is offline Parsing and modifying text per line - Find occurences Windows 10 Parsing and modifying text per line - Find occurences Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing and modifying text per line - Find occurences Count occurences of 2 words (that are near each other) 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
Parsing and modifying text per line - Find occurences Parsing 'FullName' column - help needed text to column ScottA Excel Programming 3 05-06-2014 12:49 PM
Parsing and modifying text per line - Find occurences Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Parsing and modifying text per line - Find occurences Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft