Link to home
Start Free TrialLog in
Avatar of yahooooo
yahoooooFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VBA Word: Bold cell's text till break line

I need to go through one column in my word table and change font to bold for all characters from the first one to first breakline so that would be the string im interested in:

                zz = Left(oCell.Range.Text, InStr(oCell.Range.Text, Chr(13)) - 1)

Im having difficulties in highlighting the 'zz' part of every cell


With appWord
            For Each oCell In .Tables(1).Range.Columns(2).Cells
                

                With .Selection
                    .Bold = True
                End With
            Next
        End With

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yahooooo

ASKER

sry for confusion, i should put on top Dim appWord As Object as well

works great :D Didnt think that I can treat cell like a word document ;)
 thanks