L
LEU
I need to create a macro that moves the brackets in our procedures to the
Right indent. Below are three examples from a procedure.
This procedure applies to all procedures which affect operations and ISFSI
including, but not limited to, the procedures required by CGS Technical
Specification 5.4.
{R-326}, {R-1413}, {R-1414}, {R-1420},
{R-1421}, {R-3721}, {R-11241},
{R-11312}, {R-11315}, {R-11323},
{R-11329}, {R-11429}
Cross-Discipline Reviewers are responsible for performing a
discipline-specific review of the procedure in their area of
expertise.{R-321}, {R-2436}
Shall review the procedure or revision changes per the Procedure
Verification and Validation Checklist, Attachment 7.3{C-7945}
I tried the follow but it didn’t work: With one set of brackets it work
fine, but when there is two or more, it put the next set of brackets out past
the right indent with a tab between each one.
Dim Msg, Style, Title, Response, MyString
Msg = " DOES THIS PROCEDURE HAVE SIGNOFF LINES?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "French Brackets"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
With SearchRange.Find
.Text = "^?{"
With Selection.Paragraphs.TabStops
.Add Position:=InchesToPoints(6.4), Alignment:=wdAlignTabRight
End With
.Replacement.Text = vbTab & "{"
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
Else ' User chose No.
With SearchRange.Find
.Text = "^?{"
With Selection.Paragraphs.TabStops
.Add Position:=InchesToPoints(6.9), Alignment:=wdAlignTabRight
End With
.Replacement.Text = vbTab & "{"
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
End If
Right indent. Below are three examples from a procedure.
This procedure applies to all procedures which affect operations and ISFSI
including, but not limited to, the procedures required by CGS Technical
Specification 5.4.
{R-326}, {R-1413}, {R-1414}, {R-1420},
{R-1421}, {R-3721}, {R-11241},
{R-11312}, {R-11315}, {R-11323},
{R-11329}, {R-11429}
Cross-Discipline Reviewers are responsible for performing a
discipline-specific review of the procedure in their area of
expertise.{R-321}, {R-2436}
Shall review the procedure or revision changes per the Procedure
Verification and Validation Checklist, Attachment 7.3{C-7945}
I tried the follow but it didn’t work: With one set of brackets it work
fine, but when there is two or more, it put the next set of brackets out past
the right indent with a tab between each one.
Dim Msg, Style, Title, Response, MyString
Msg = " DOES THIS PROCEDURE HAVE SIGNOFF LINES?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "French Brackets"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
With SearchRange.Find
.Text = "^?{"
With Selection.Paragraphs.TabStops
.Add Position:=InchesToPoints(6.4), Alignment:=wdAlignTabRight
End With
.Replacement.Text = vbTab & "{"
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
Else ' User chose No.
With SearchRange.Find
.Text = "^?{"
With Selection.Paragraphs.TabStops
.Add Position:=InchesToPoints(6.9), Alignment:=wdAlignTabRight
End With
.Replacement.Text = vbTab & "{"
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
End If