Hello guys,
I need to ask if it's possible to do amend on the below code related to Inserting Brackets I need to add the brackets in each bold sentences after selecting the same format
Sub AddBrackets()
Dim iCount As Integer
iCount = 1
While Right(Selection.Text, 1) = " " Or _
Right(Selection.Text, 1) = Chr(13)
Selection.MoveLeft Unit:=wdCharacter, Count:=1, _
Extend:=wdExtend
iCount = iCount + 1
Wend
Selection.InsertAfter "]"
Selection.InsertBefore "["
Selection.MoveRight Unit:=wdCharacter, Count:=iCount
End Sub
The problem with the code now it's adding the brackets for the last line only do you know or if it's possible to help on how I can add to each bold sentence only ?
I would be appreciated for your time and effort
Attachments area
I need to ask if it's possible to do amend on the below code related to Inserting Brackets I need to add the brackets in each bold sentences after selecting the same format
Sub AddBrackets()
Dim iCount As Integer
iCount = 1
While Right(Selection.Text, 1) = " " Or _
Right(Selection.Text, 1) = Chr(13)
Selection.MoveLeft Unit:=wdCharacter, Count:=1, _
Extend:=wdExtend
iCount = iCount + 1
Wend
Selection.InsertAfter "]"
Selection.InsertBefore "["
Selection.MoveRight Unit:=wdCharacter, Count:=iCount
End Sub
The problem with the code now it's adding the brackets for the last line only do you know or if it's possible to help on how I can add to each bold sentence only ?
I would be appreciated for your time and effort
Attachments area