Hi Graham, thanks for clarifying but unfortunately quotes were not the issue I had in my original post. My original code inserts a tab after the closing bold quote which is what I want it to do, but the issue is, if there is a square bracket at the beginning (before the opening bold quote) the tab part of the code isn't recognising this to insert a tab after the closing bold quote, this is where I need some help as I can't figure out why its not inserting a tab.
oRng.Text = Chr(34) & oRng.Text & Chr(34) 'Quotation marks If oRng.Characters.First.Previous = Chr(13) Then 'Carriage return
oRng.Collapse wdCollapseEnd
oRng.Font.Bold = False
oRng.Characters.Last = vbTab
Else
oRng.Collapse wdCollapseEnd
EDIT: Graham I think I've fixed the issue as per below
.Text = .Text & Chr(34) & Chr(9)
This seems to be working but has thrown up another issue if there is an additional definition within the same paragraph, it is inserting a tab but my code below should remove the tab before 'shall' but isn't working now, any ideas?
Proper Functioning"[tab]means, in respect of each PV System, the proper and correct functioning and the good commercial operation that would be expected from the Commencement Date, including but not limited to the proper and correct energy conversion, electrical generation, PV System monitoring, functioning of each and every Component Part, and structural stability and integrity and "Properly Functioning"[tab]shall be construed accordingly;
Set oRng = ActiveDocument.Range With oRng.Find
.Text = "^t"
Do While .Execute
oRng.Start = oRng.Paragraphs(1).Range.Start
If Len(.Text) - Len(Replace(.Text, vbTab, "")) > 1 Then oRng.Characters.Last.Text = " "
oRng.Collapse wdCollapseEnd
Loop
End With