Option Explicit
Dim strSiglum As String
Dim blnSiglum As Boolean
Dim blnNextVariant As Boolean
Dim blnFound As Boolean
Dim strSel As String
Dim lngQuery As Long
Dim X As Integer
Dim myWorkingRange As Range
Dim Count As Integer
Dim strSiglumA As String
Dim strSiglum1 As String
Dim strSiglum2 As String
Dim strSiglum3 As String
Dim strSiglum4 As String
Dim strSiglum5 As String
Dim strSiglum6 As String
Dim strSiglum7 As String
Dim strSiglum8 As String
Dim strSiglum9 As String
Dim strSiglum10 As String
Dim strSiglum11 As String
Dim strSiglum12 As String
Dim strSiglum13 As String
Dim strSiglum14 As String
Dim strSiglum15 As String
Dim strSiglum16 As String
Dim strSiglum17 As String
Dim strSiglum18 As String
Dim strSiglum19 As String
Dim strSiglum20 As String
Dim strSiglum21 As String
Dim strSiglum22 As String
Dim strSiglum23 As String
Dim strSiglum24 As String
Dim strSiglum25 As String
Dim strSiglum26 As String
Dim strSiglum27 As String
Dim strSiglum28 As String
Dim strSiglum29 As String
Dim strSiglum30 As String
Dim strSiglum31 As String
Dim strSiglum32 As String
Dim strSiglum33 As String
Dim strSiglum34 As String
Dim strSiglum35 As String
Dim strSiglum36 As String
Sub aaAutonum()
'
' aaAutonum Macro
' Macro created 15/09/99 by Kilcullen
'
Dim Count As Integer
Selection.HomeKey Unit:=wdStory ' "selection" object is a highlighted
'text block or (in this case) the current insertion point
'For Count = 1 To 9999
'Repeat:
Count = 6345 'added: to set value before loop
Do 'added instead of For and Repeat
Selection.Find.ClearFormatting
With Selection.Find
.text = "@"
.Replacement.text = ""
.Forward = True
.MatchWildcards = False
End With
Selection.Find.Execute
'If Selection.Find.Found = True Then
If Selection.Find.Found = False Then Exit Do 'added
WordBasic.Insert Str$(Count)
WordBasic.WordRight 1
'Else: GoTo Finish
'End If
Count = Count + 1 'added: to increase value before loop
'Next
Loop 'added instead of Next
'Finish: 'not needed because of Exit Do
End Sub
Sub AllVariantsRed()
'
' AllVariantsRed Macro
' Macro recorded 27/10/03 by John
Selection.HomeKey Unit:=wdStory
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call xDeRedSquare
End Sub
Sub AllVariantsRed2()
'
' zRedSigla2 Macro
' Macro recorded 12/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Call wPreserveQuotes
Selection.HomeKey Unit:=wdStory
'make a para of each variant
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "*) {"
.Replacement.text = "*) !^p{"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = "}!^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
'Red each string
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "!^p{"
.Replacement.text = "}!^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
With Selection.Font
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
'remove extra paras
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "!^p"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call xDeRedSquare
End Sub
Sub xDeRedSquare()
'
' xDeRedSquare Macro
' Macro recorded 12/11/03 by John
'
Selection.HomeKey Unit:=wdStory
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = "\[*\]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub Reference()
'
' Reference Macro
' To insert (+ +) {}
' move cursor to end position, ctrl+v
' Suggested keyboard shortcut: Alt+Ctrl+Shift+R
'
Selection.TypeText text:="(++) {} "
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.Cut
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub AllWdBoldandItal()
'
' AllWdBoldandItal Macro
' To insert coding around all bold and ital words in Word document
'
' Bold
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<BDB>"
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<BDE>"
Loop
'Code Italic
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<IB>"
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<IE>"
Loop
'Remove all formatting
Selection.HomeKey Unit:=wdStory
Selection.WholeStory
With Selection.Font
.Bold = False
.Italic = False
End With
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p<IE><BDE>"
.Replacement.text = "<BDE><IE>^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub Square2FN()
'
' Square2FN Macro
' Macro recorded 12/19/99 by Kilcullen
' Suggested keyboard shortcut: Alt+Ctrl+[
'
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\[*\]"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Cut
ActiveDocument.Footnotes.Add Range:=Selection.Range, Reference:=""
Selection.Paste
Selection.TypeBackspace
Selection.HomeKey Unit:=wdLine
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "["
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.TypeBackspace
End Sub
Sub DeleteNextVariant()
'
' DeleteNextVariant Macro
' To delete material in next {}
' Suggested keyboard shortcut: Alt+Ctrl+Shift+D
'
'Delete (* *)
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "(*"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
' 'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*)"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
'delete {*}
' 'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
Sub Italics()
'
' Italics Macro
' To insert <IB> <IE>
' move cursor to end position, ctrl+v
'Suggested keyboard shortcut: Alt+Ctrl+Shift+I
'
Selection.TypeText text:="<IB> <IE>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub Bold()
'
' Bold Macro
' To insert <BDB> <BDE>
' move cursor to end position, ctrl+v
' Suggested keyboard shortcut: Alt+Ctrl+Shift+B
'
Selection.TypeText text:="<BDB> <BDE>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub CodeVariant()
'
' CodeVariant Macro
' To insert (**) {}
' move cursor to end position, ctrl+v
' Suggested keyboard shortcut: Alt+Ctrl+Shift+V
'
Selection.TypeText text:="(* *) {}"
Selection.MoveLeft Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.Cut
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub DoubleQuotes()
'
' DoubleQuotes Macro
' Suggested keyboard shortcut: Alt+Ctrl+Shift+"
'
Selection.Find.ClearFormatting
With Selection.Find
.text = """"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then GoTo Lastline
Selection.TypeText text:="{C170}"
Selection.Find.ClearFormatting
With Selection.Find
.text = """"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.TypeText text:="{C186}"
Lastline:
End Sub
Sub SingleQuotes()
'
' SingleQuotes Macro
' Macro recorded 12/16/99 by Kilcullen
'Suggested keyboard shortcut: Alt+Ctrl+'
'
Selection.Find.ClearFormatting
With Selection.Find
.text = "'"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then GoTo Lastline
Selection.TypeText text:="{C096}"
Selection.Find.ClearFormatting
With Selection.Find
.text = "'"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.TypeText text:="{C039}"
Lastline:
End Sub
Sub HTMLBoldandItal()
'
' HTMLBoldandItal Macro
' To convert Bold and Italic format in Word document
'
'convert italic to html
Selection.HomeKey Unit:=wdStory
'Do
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Do While Selection.Find.Found
'If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<em>"
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="</em>"
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = False
.Format = True
End With
Selection.Find.Execute
Selection.Font.Italic = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
' Find again
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Loop
'convert bold to html
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<strong>"
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="</strong>"
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = False
.Format = True
End With
Selection.Find.Execute
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
End Sub
Sub HTMLParas()
'
' HTMLParas Macro
' To insert <p>
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p"
.Replacement.text = "<p>^p"
.Forward = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
End Sub
Sub TxTrTabl()
'
' TxTrTabl Macro
' Macro created 04/10/99 by Kilcullen
'
'
Load InfoForm
InfoForm.Show
'Variable declarations
Dim TxtFile As String
Dim TransFile As String
Dim DialSect As String
Dim EdTrans As String
Dim PrefFile As String
Dim MoYear As String
Dim OutputFile As String
'Set variables'
TxtFile = InfoForm.TxFile
TransFile = InfoForm.trFile
DialSect = InfoForm.DlSec
EdTrans = InfoForm.edTr
PrefFile = InfoForm.PrFile
MoYear = InfoForm.MoYr
OutputFile = InfoForm.Oput
'OPEN DOCUMENTS AND CODE FOR HTML
'Open English translation
Documents.Open FileName:=TransFile, ConfirmConversions:=False
'convert italic and bold to html
Call HTMLBoldandItal
Selection.HomeKey Unit:=wdStory
'Save as text file z.txt
ActiveDocument.SaveAs FileName:="ztr.txt", FileFormat:=wdFormatText
'Open preface
Documents.Open FileName:=PrefFile, ConfirmConversions:=False
'Convert to html coding for italic, bold, and paragraphs
Application.Run MacroName:="HTMLBoldandItal"
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLParas"
Selection.HomeKey Unit:=wdStory
'save Preface as text file zz.txt
ActiveDocument.SaveAs FileName:="zpr.txt", FileFormat:=wdFormatText
'Open Latin text
Documents.Open FileName:=TxtFile, ConfirmConversions:=False 'This works
'HTML coding for italic and bold
Application.Run MacroName:="HTMLBoldandItal"
'Save Latin text file as file for text and translation side-by-side
ActiveDocument.SaveAs FileName:="ztx.txt", FileFormat:=wdFormatText
'ENTER HTML CODING IN FILE ZTX.TXT
'Enter material preceding table
Selection.TypeText text:="<html>"
Selection.TypeParagraph
Selection.TypeText text:="<head>"
Selection.TypeParagraph
Selection.TypeText text:="<title>"
Selection.TypeParagraph
Selection.TypeText text:=DialSect
Selection.TypeParagraph
Selection.TypeText text:="</title>"
Selection.TypeParagraph
Selection.TypeText text:="</head>"
Selection.TypeParagraph
Selection.TypeText text:="<BODY BGCOLOR=""WHITE"" TEXT=""BLACK"" LINK=""RED"" VLINK=""#7F0000"">"
Selection.TypeParagraph
Selection.TypeText text:="<h1 align=center>"
Selection.TypeParagraph
Selection.TypeText text:="WILLIAM OF OCKHAM, <em>DIALOGUS</em><br>"
Selection.TypeText text:=DialSect
Selection.TypeText text:="</h1>"
Selection.TypeText text:="<h2 align=center>Text and translation by "
Selection.TypeText text:=EdTrans
Selection.TypeParagraph
Selection.TypeText text:="<br> as at "
Selection.TypeText text:=MoYear
Selection.TypeText text:="<p><font size = -3>Copyright © 2000, The British Academy</font></H2>"
Selection.TypeText text:="<p><hr><p>"
Selection.InsertFile FileName:="zpr.txt"
Selection.TypeText text:="<p><hr><p>"
Selection.TypeParagraph
Selection.TypeText text:="<table>"
Selection.TypeParagraph
'ADD MARKER TO PARAGRAPH ENDS IN LATIN TEXT AND THEN IN ENGLISH TRANS
'Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .text = "^p"
' .Replacement.text = "%^p"
' .Forward = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Windows("ztr.txt").Activate 'open English translation
'Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .text = "^p"
' .Replacement.text = "%^p"
' .Forward = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Windows("ztx.txt").Activate 'reopen Latin text
'MAKE SIDE-BY-SIDE LATIN AND ENGLISH TABLE
Do
'check whether there is another paragraph of Latin text and exit if not
Selection.Find.ClearFormatting
With Selection.Find
.text = "$"
.Forward = True
.Format = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'Enter html code to begin table line
Selection.MoveUp Unit:=wdParagraph, Count:=1
Selection.TypeText text:="<tr><td valign = top>"
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeText text:="</td><td valign = top>"
'ActiveWindow.Next.Activate
'Get paragraph of translation
Windows("ztr.txt").Activate 'open English translation
Selection.Find.ClearFormatting
With Selection.Find
.text = "$"
.Forward = True
.Format = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveUp Unit:=wdParagraph, Count:=1
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Cut
'Insert English translation in RH cell of table
Windows("ztx.txt").Activate 'open Latin text
Selection.Paste
Selection.TypeBackspace
Selection.TypeText text:="</td></tr>"
Selection.MoveDown Unit:=wdParagraph, Count:=1
Loop
'Delete paragraph markers
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "$"
.Replacement.text = ""
.Forward = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.EndKey Unit:=wdStory
'Complete coding of table and save output file
Selection.TypeText text:="</table><p><p>Return to <A HREF=""wtc.html#part1b"">Table of Contents</A><p></body></html>"
ActiveDocument.SaveAs FileName:=OutputFile, FileFormat:=wdFormatText
On Error GoTo Finish
Finish:
MsgBox ("If macro has not run, check file names and file locations. Save output as Text Only, changing the extension from .txt to .html, and open in web browser. If text and translation do not match, check paragraphing. Minor problems can be fixed by using a web editor, e.g. WebExpress.")
End Sub
Sub Footnote2Variant()
'
' Footnote2Variant Macro
' To take material from a footnote and
' insert it as a cet-coded variant in the text
' Suggested keyboard shortcut: Alt+Ctrl+Shift+F
'
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "^f"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then GoTo Lastline
Application.Run MacroName:="ViewFootnotes"
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
ActiveWindow.ActivePane.Close
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText text:=" {"
Selection.Paste
Selection.TypeText text:="} "
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.TypeText text:="*)"
Selection.MoveLeft Unit:=wdWord, Count:=2
Selection.TypeText text:="(*"
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Lastline:
End Sub
Sub ViewFootnotes()
'
' ViewFootnotes Macro
' Macro recorded 12/19/99 by Kilcullen
'
If ActiveWindow.ActivePane.View.Type = wdPrintView Or ActiveWindow. _
ActivePane.View.Type = wdWebView Or ActiveWindow.ActivePane.View.Type = _
wdPrintPreview Then
ActiveWindow.View.SeekView = wdSeekFootnotes
Else
ActiveWindow.View.SplitSpecial = wdPaneFootnotes
End If
End Sub
Sub DULSel()
'
' DULSel Macro
' To bold double underline selection
' Suggested keyboard shortcut: Alt+Ctrl+Shift+S
'
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub DULCursor2Curl()
'
' DULCursor2curl Macro
' Double underline bold from cursor to curly bracket inclusive
' Suggested keyboard shortcut: Alt+Ctrl+Shift+C
'
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub DULNextVariant()
'
' DULNextVariant Macro
' Find next (**), bold double underline (* *) and variant
' Suggested keyboard shortcut: Alt+Ctrl+Shift+N
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "(*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchWildcards = False
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "\*\)*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub InsertComment()
'
' InsertComment Macro
' To insert bold underlined comment
' Suggested keyboard shortcut: Alt+Ctrl+Shift+M
'
Selection.TypeText text:="<UB><BDB>COMMENT HERE<BDE><UE>"
Selection.MoveLeft Unit:=wdWord, Count:=12, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "comment here"
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
Sub htmlNoteCalls()
'
' htmlNoteCalls Macro
' Replace notecalls with [<a href = "n%">note @</a>], then number
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^f"
.Replacement.text = "[<a href=""txt.html#n%"">Note @</a>]"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.EscapeKey
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="aaAutonum"
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "%"
.Replacement.text = "@"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run MacroName:="aaAutonum"
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = """n "
.Replacement.text = """n"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Note "
.Replacement.text = "Note "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub Added()
'
' Added Macro
' Suggested keyboard shortcut: Alt+Ctrl+Shift+A
'
Selection.TypeText text:="<IB>added<IE> "
End Sub
Sub Omitted()
'
' Omitted Macro
' Suggested keyboard shortcut: Alt+Ctrl+Shift+O
'
Selection.TypeText text:="<IB>omitted<IE> "
End Sub
Sub Overlap()
'
' Overlap Macro
' To insert ^A A^
' move cursor to end position, ctrl+v
' substitute another letter for A if A already used in the paragraph
' Suggested keyboard shortcut: Alt+Ctrl+Shift+P
'
Selection.TypeText text:="^A A^"
Selection.MoveLeft Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
End Sub
Sub Lembeg()
'
' Lembeg Macro
' To insert coding where lemma extends beyond one paragraph
' move cursor to end position, ctrl+v
' Suggested keyboard shortcut: Alt+Ctrl+Shift+L
'
Selection.TypeText text:= _
"@lembegNUMBER (**) {-#lembegNUMBER LEMMA-} {VARIANT}"
Selection.MoveLeft Unit:=wdWord, Count:=8, Extend:=wdExtend
Selection.Cut
End Sub
Sub htmlConvertWordDocument()
'
' Word2HTML Macro
' Macro recorded 1/12/01 by Kilcullen
'
MsgBox ("Codes headings, bold, italic, list bullet, blocktext; not tables. Enter to continue.")
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLWdHeadings"
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLBoldandItal"
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLParas"
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLWdBullets"
Selection.HomeKey Unit:=wdStory
Application.Run MacroName:="HTMLWdBlockTxt"
Application.Run MacroName:="htmlTopAndBottom"
MsgBox ("Save as .txt, but change extension to .html.")
End Sub
Sub HTMLWdHeadings()
'
' HTMLWdHeadings Macro
' Macro recorded 2/5/01 by Kilcullen
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Heading 1")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Style = ActiveDocument.Styles("Normal")
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<h1>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</h1>"
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Heading 2")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Style = ActiveDocument.Styles("Normal")
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<h2>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</h2>"
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Heading 3")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Style = ActiveDocument.Styles("Normal")
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<h3>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</h3>"
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Heading 4")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Style = ActiveDocument.Styles("Normal")
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<h4>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</h4>"
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Heading 5")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Style = ActiveDocument.Styles("Normal")
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<h5>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</h5>"
Loop
End Sub
Sub ThirdSeries()
'
' ThirdSeries Macro
' To insert (- -) {} (chapter summaries)
' move cursor to end position, ctrl+v
' Suggested keyboard shortcut: Alt+Ctrl+Shift+Y
'
Selection.TypeText text:="(- -) {}"
Selection.MoveLeft Unit:=wdWord, Count:=2, Extend:=wdExtend
Selection.Cut
End Sub
Sub DULRemoveNxtFormat()
'
' DULRemoveNxtFormat Macro
' Remove double underline format from next underlined word
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = ""
.Replacement.text = " "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub HTMLWdBullets()
'
' HTMLWdBullets Macro
'Bullet to unordered list
'
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("List Bullet")
With Selection.Find
.text = ""
.Replacement.text = "^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.HomeKey Unit:=wdLine
Selection.TypeText text:="<ul><li>"
Selection.EndKey Unit:=wdLine
Selection.TypeText text:="</ul>"
Loop
'remove bullet format
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("List Bullet")
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("Normal")
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove superfluous coding
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "</ul>^p<ul>"
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub HTMLWdBlockTxt()
'
' HTMLWdBlockTxt Macro
' Macro recorded 3/5/01 by Kilcullen
'
Do
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Block Text")
With Selection.Find
.text = ""
.Replacement.text = "^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<blockquote>"
'move up out of blocktext
Selection.MoveUp Unit:=wdLine, Count:=1
'find same block
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Block Text")
With Selection.Find
.text = ""
.Replacement.text = "^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="</blockquote>"
Loop
End Sub
Sub htmlTopAndBottom()
'
' htmlTopAndBottom Macro
' To insert beginning and end html coding
'
Dim strStyle As String
Selection.HomeKey Unit:=wdStory
Selection.TypeText text:="<html>"
Selection.TypeParagraph
Selection.TypeText text:="<head>"
Selection.TypeParagraph
Selection.TypeText text:="<title>"
Selection.TypeParagraph
Selection.TypeText text:="</title>"
Selection.TypeParagraph
strStyle = InputBox("What is the name of the stylesheet to be used? (Do not inclued extension .css)", "Stylesheet?")
Selection.TypeText text:= _
"<LINK REL=""stylesheet"" HREF="
Selection.TypeText text:=""""
Selection.TypeText text:=strStyle
Selection.TypeText text:=".css"" TYPE=""text/css""></head"
Selection.TypeText text:=">"
Selection.TypeParagraph
Selection.TypeText text:= _
"<body bgcolor=""white"" text=""black"" link=""red"" vlink=""#7f0000"
Selection.TypeText text:=""" leftmargin=""170"" marginwidth=""170"">"
Selection.TypeParagraph
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.TypeText text:="</body></html>"
End Sub
Sub CurrentSiglum()
'
' Fi Macro
' Macro recorded 6/09/02 by John
'
Selection.TypeText text:="Ca"
ActiveDocument.Save
End Sub
Sub ULDHCursor2Curl()
'
' ULDHCursor2curl Macro
' Double underline bold from cursor to curly bracket inclusive
' Suggested keyboard shortcut: Alt+Ctrl+Shift+3
'
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub ULDHNextVariant()
'
' ULDHNextVariant Macro
' Find next (**), bold double underline (* *) and variant
' Suggested keyboard shortcut: Alt+Ctrl+Shift+1
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "(*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchWildcards = False
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "\*\)*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub ULDHSel()
'
' ULDHSel Macro
' To bold double underline selection
' Suggested keyboard shortcut: Alt+Ctrl+Shift+2
'
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveDocument.Save
End Sub
Sub GroupSigla()
'
' aGroupSigla Macro
' Macro recorded 15/09/02 by John
'Copies sigla in order corresponding to grouping defined by assignment of variables
'leaves old sigla string green, followed by new grouped string blue.
'Bb(FiAnCe) (group A1)
'La(KoCa)UnVd Fr (group A2) REVISED: CaKoLcLaVdFr
'(NaLc) REVISED: delete
'VgVaPcPaLb (group B1) REVISED: PaLbVaVg
'VbSa(PbAr) (group B2) REVISED: VbPbAr
'(Pz(LyGs))
'BaDiToEs (group C)
'VcVf(OxAv)BrWe (group D)
'
'To change grouping, reassign variables or reorder steps in zReorderSigla
Application.ScreenUpdating = False
lngQuery = MsgBox("Supposes that whole passage has been copied to Source.doc." _
& vbCr & "Source.doc and process.doc must be open." _
& vbCr & vbCr & "Continue?", vbYesNo + vbQuestion, "Continue?")
If lngQuery = vbNo Then End
Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
Call wPreserveQuotes
Call wMarkLemmata
'Call zSpaceSigla
Call wwMarkSigla
Call AGroupSiglaCleanUp
Selection.HomeKey Unit:=wdStory
Call zMarkSigla
Selection.HomeKey Unit:=wdStory
Call zDeMarkHash
Call zDeUnderlineMarks
Selection.HomeKey Unit:=wdStory
Do
Windows("source.doc").Activate
ActiveDocument.Save
'Copy Next Para
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\<NPG\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Copy
Windows("process.doc").Activate
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Paste
Selection.HomeKey Unit:=wdStory
Do
'find next |
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
' Selection.Find.Font.Color = wdColorAutomatic
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Call zReorderSigla
Loop
'transfer output to source
Selection.WholeStory
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Windows("source.doc").Activate
Selection.Paste
Loop
Call wwDeMarkSigla
Call zRecolourStrings
Call zDeleteExtraSpaces
Call wRestoreQuotes
Call wRecolourLemmata
'ActiveDocument.Save
'ActiveDocument.Close
End Sub
Sub zReorderSigla()
'
' zReorderSigla Macro
' Macro recorded 11/09/02 by John
'Bb (Fi An Ce) (group 1)
'(Fr La (Ko Ca) Un Vd) (group 2)
'(Na Lc) (Vg Va Pc Pa) Lb Vb Sa (Pb Ar) (group 3)
'(Pz (Ly Gs)) (group 4)
'Ba Di To Es (group 5)
'Vc Vf (Ox Av) Br We (group 6)
'
'To change grouping, reassign variables
'comment out parts referring to sigla not found in file to be processed
strSiglum1 = "Bb"
strSiglum2 = "Fi"
strSiglum3 = "An"
strSiglum4 = "Ce"
strSiglum5 = "Ca"
strSiglum6 = "Ko"
strSiglum7 = "Lc"
strSiglum8 = "La"
strSiglum9 = "Un"
strSiglum10 = "Vd"
strSiglum11 = "Fr"
'strSiglum12 = "Pc"
strSiglum13 = "Pa"
strSiglum14 = "Lb"
strSiglum15 = "Va"
strSiglum16 = "Vg"
strSiglum17 = "Vb"
'strSiglum18 = ""
'correction made below
strSiglum19 = "Sa"
strSiglum20 = "Pb"
strSiglum21 = "Ar"
strSiglum22 = "Pz"
strSiglum23 = "Ly"
strSiglum24 = "Gs"
strSiglum25 = "Ba"
strSiglum26 = "Di"
strSiglum27 = "To"
strSiglum28 = "Es"
strSiglum29 = "Vc"
strSiglum30 = "Vf"
strSiglum31 = "Ox"
strSiglum32 = "Av"
strSiglum33 = "Br"
strSiglum34 = "We"
strSiglum = strSiglum1 'Bb
Call zFindSiglum
strSiglum = strSiglum2 'Fi
Call zFindSiglum
strSiglum = strSiglum3 'An
Call zFindSiglum
strSiglum = strSiglum4 'Ce
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum5 'Ca
Call zFindSiglum
strSiglum = strSiglum6 'Ko
Call zFindSiglum
strSiglum = strSiglum7 'Lc
Call zFindSiglum
strSiglum = strSiglum8 'La
Call zFindSiglum
strSiglum = strSiglum9 'Un
Call zFindSiglum
strSiglum = strSiglum10 'Vd
Call zFindSiglum
strSiglum = strSiglum11 'Fr
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum13 'Pa
Call zFindSiglum
strSiglum = strSiglum14 'Lb
Call zFindSiglum
strSiglum = strSiglum15 'Va
Call zFindSiglum
strSiglum = strSiglum16 'Vg
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum17 'Vb
Call zFindSiglum
strSiglum = strSiglum19 'Sa
Call zFindSiglum
strSiglum = strSiglum20 'Pb
Call zFindSiglum
strSiglum = strSiglum21 'Ar
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum22 'Pz
Call zFindSiglum
strSiglum = strSiglum23 'Ly
Call zFindSiglum
strSiglum = strSiglum24 'Gs
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum25 'Ba
Call zFindSiglum
strSiglum = strSiglum26 'Di
Call zFindSiglum
strSiglum = strSiglum27 'To
Call zFindSiglum
strSiglum = strSiglum28 'Es
Call zFindSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum29 'Vc
Call zFindSiglum
strSiglum = strSiglum30 'Vf
Call zFindSiglum
strSiglum = strSiglum31 'Ox
Call zFindSiglum
strSiglum = strSiglum32 'Av
Call zFindSiglum
strSiglum = strSiglum33 'Br
Call zFindSiglum
strSiglum = strSiglum34 'We
Call zFindSiglum
Call zRecolourStrings
End Sub
Sub zFindSiglum()
'
' zFindSiglum Macro
' Macro recorded 15/09/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "%" & strSiglum
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then GoTo Finish
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
'copy siglum, siglum+b or siglum+m
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
'return to |
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'paste in siglum+, delete extra spaces
Selection.Paste
' Selection.TypeBackspace
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
Finish:
End Sub
Sub zRecolourStrings()
'' zRecolourStrings Macro
' Macro recorded 15/09/02 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "~*"
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorBlue
End With
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "`*"
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorGreen
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Colour | blue
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorBlue
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub zMarkSigla()
'
' zMarkSigla Macro
' Macro recorded 14/09/02 by John
' Leaves sigla strings red, with ` to mark beginning and ~| to mark end
'preliminary to a5GroupSigla
Selection.HomeKey Unit:=wdStory
'global substitution of ~, for red ,
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = ","
.Replacement.text = " |~,"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'of ~; for ;
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = ";"
.Replacement.text = " |~;"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'of ~} for }
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "}"
.Replacement.text = " |~}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Selection.HomeKey Unit:=wdStory
'Call zMoveComments
Selection.HomeKey Unit:=wdStory
'Used to be zzMarkSigla
Do
'Find next red % and put ` in front of it
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "%"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="`"
Selection.MoveRight Unit:=wdCharacter, Count:=1
'find end of string
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "|"
.Replacement.text = "~}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.WholeStory
Selection.Font.Color = wdColorAutomatic
Selection.MoveUp Unit:=wdLine, Count:=1
End Sub
Sub zRedSigla()
'
' zRedSigla Macro
' Macro recorded 14/09/02 by John
'
'Why does this fail?
'Call WildcardSearch
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "`*|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zRedSigla2()
'
' zRedSigla2 Macro
' Macro recorded 12/11/03 by John
'
Selection.HomeKey Unit:=wdStory
'make a para of each string of sigla
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "`"
.Replacement.text = "!^p`"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "|~"
.Replacement.text = "|~!^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Red each string
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "`"
.Replacement.text = "|~^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
With Selection.Font
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
'remove extra paras
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "!^p"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPositiveApparatAutocol()
'
' zPositiveApparatAutocol Macro
' Macro recorded 14/09/02 by John
'
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ":"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub zDeRedRefs()
'
' zDeRedRefs Macro
' Macro recorded 14/09/02 by John
'
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "+)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub zMoveComments()
'
' zMoveComments Macro
' Macro recorded 15/09/02 by John
'
Do
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "\<UB\>*\<UE\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Cut
Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "~"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Paste
Loop
End Sub
Sub AGroupSiglaCleanUp()
'
' AGroupSiglaCleanUp Macro
' Macro recorded 20/10/02 by John
'
Selection.HomeKey Unit:=wdStory
'delete green
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorGreen
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'replace ~ with space
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "~"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'replace space| with space
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " |"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .Text = " }"
' .Replacement.Text = "}"
' .Forward = True
'
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'
'reduce extra spaces to one space
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'Change blue to auto
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call wDeUnderlineSpace
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = " }"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
zDeleteExtraSpaces
End Sub
Sub zDeMarkHash()
'
' zDeMarkHash Macro
' Macro recorded 21/10/02 by John
'
'Change red string containing Zz to autocolour
Selection.Find.Font.Color = wdColorRed
'Call WildcardSearch
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = "` Zz*|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'delete ` at beginning of autocoloured strings
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "`"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'delete ~|
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "~|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call zDelZz
End Sub
Sub zDeUnderlineMarks()
'
' zDeUnderlineMarks Macro
' Macro recorded 21/10/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = " ~|"
.Replacement.text = " ~|"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDelExtraComSemi()
'
' zDelExtraComSemi Macro
' Macro recorded 21/10/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ",}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = ";}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ";}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDelUnderlined()
'
' zDelUnderlined Macro
' Macro recorded 21/10/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineSingle
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call zDeleteExtraSpaces
Call zDelExtraComSemi
End Sub
Sub zDelZz()
'
' zDelZz Macro
' Macro recorded 21/10/02 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " Zz "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub NoUnderline()
'
' NoUnderline Macro
' Macro recorded 23/12/02 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
Sub zUnderlineSpacesPunct()
'
' z Macro
' Macro recorded 1/01/03 by John
'
Call AllVariantsRed2
'Underline Dotted Heavy
'Commas
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ","
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDottedHeavy Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'Semicolons
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ";"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDottedHeavy Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'spaces
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = " "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDottedHeavy Then
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'Double Underline
'Commas
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ","
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDouble Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'Semicolons
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ";"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDouble Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'spaces
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = " "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDouble Then
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Loop
'punctuation following underline
'semicolon
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ";"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDottedHeavy Then
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveRight Unit:=wdCharacter, Count:=2
Loop
'semicolon
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ";"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDouble Then
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveRight Unit:=wdCharacter, Count:=2
Loop
'comma
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ","
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDottedHeavy Then
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveRight Unit:=wdCharacter, Count:=2
Loop
'comma
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
With Selection.Find
.text = ","
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
If Selection.FormattedText.Underline = wdUnderlineDouble Then
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorRed
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Selection.MoveRight Unit:=wdCharacter, Count:=2
Loop
End Sub
Sub zMedievalSpelling()
'
' zMedievalSpelling Macro
' Macro recorded 1/01/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "ae"
.Replacement.text = "e"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "oe"
.Replacement.text = "e"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "damn"
.Replacement.text = "dampn"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "quicq"
.Replacement.text = "quidq"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Quicq"
.Replacement.text = "Quidq"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .text = "quatenus"
' .Replacement.text = "quatinus"
' .Forward = True
'
' .Format = False
' .MatchCase = True
' .MatchWholeWord = True
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "mihi"
.Replacement.text = "michi"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "nihil"
.Replacement.text = "nichil"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "his"
.Replacement.text = "hiis"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "hi"
.Replacement.text = "hii"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "immo"
.Replacement.text = "ymmo"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "toler"
.Replacement.text = "toller"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Michel"
.Replacement.text = "Michael"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "michel"
.Replacement.text = "michael"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Isrel"
.Replacement.text = "Israel"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "isrel"
.Replacement.text = "israel"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Dialog"
.Replacement.text = "Dyalog"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRemoveComments()
'
' wRemoveComments Macro
' Macro recorded 6/01/03 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<UB*\<UE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub FNcet()
'
' FNcet Macro
' Macro recorded 24/01/03 by John
'
Selection.TypeText text:="(=<RB>@<RE>=) {.}"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=3
End Sub
Sub LemmataBlueWavy()
'
' LemmataRed Macro
' Macro recorded 17/03/03 by John
'
Selection.HomeKey Unit:=wdStory
Call AllVariantsRed2
Selection.HomeKey Unit:=wdStory
'Find next red ]
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Find previous {
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Select lemma
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "*\]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
'Colour lemma green
With Selection.Font
.Color = wdColorBlue
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
'replace red with autocolour
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
''replace green with red
' Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorGreen
' Selection.Find.Replacement.ClearFormatting
' Selection.Find.Replacement.Font.Color = wdColorRed
' With Selection.Find
' .text = ""
' .Replacement.text = ""
' .Forward = True
'
' .Format = True
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
Call wMarkLemmata
End Sub
Sub zFind()
'
' zFind Macro
' Macro recorded 17/03/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
Sub DeleteLemmataWithinVariants()
'
' a8DeleteLemmataWithinVariants Macro
' Macro recorded 4/13/01 by Kilcullen
'
Selection.HomeKey Unit:=wdStory
Call AllVariantsRed
Do
'Find next lemma marker
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
'find preceding {
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
'Select from inside { to ]
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "*\]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
'Delete
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Loop
Call AutoColour
End Sub
Sub AutoColour()
'
' AutoColour Macro
' Macro recorded 6/19/01 by Kilcullen
'
Selection.WholeStory
Selection.Font.Color = wdColorAutomatic
Selection.HomeKey Unit:=wdStory
End Sub
Sub KnyshColoured()
'
' KnyshColoured Macro
' Macro recorded 15/03/03 by John
'
'eliminate space at beginning of para
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p "
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove bold and italic format from coloured text
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorGreen
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPaleBlue
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRose
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Bold = False
.Italic = False
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'format regular space between capitulum and chapter number
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = "Capitulum"
.Replacement.text = "<NPG>"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Bold = True
.Italic = True
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Call cetLayout
Call zSpaceBeforeAfterCurley
Call zPunctFromLemmata
End Sub
Sub zSpaceBeforeAfterCurley()
'extra spaces before or after curly brackets
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{ "
.Replacement.text = "{"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " }"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPunctFromLemmata()
' move punctuation out of lemmata
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = ",*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:=","
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = ";*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:=";"
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = ".*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="."
Loop
End Sub
Sub cetLayout()
'
' cetLayout Macro
' Macro created 2/22/01 by Kilcullen
'
Selection.HomeKey Unit:=wdStory
With Selection.Font
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
End With
Selection.TypeParagraph
Selection.HomeKey Unit:=wdStory
'Code bold and italic
Call cetCodeBoldandItal
'Correct order between BDE and parasign
Call wCorrectOrderBDE
'Correct order for bold italic
Call wCorrectOrderBoldItal
'format paragraphs
Call wFormatParas
'format chapters
Call wFormatChapters
'delete extra empty paragraphs
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p^p^p"
.Replacement.text = "^p^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Delete duplication of NPG
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<NPG>^p^p<NPG>"
.Replacement.text = "<NPG>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub FromKnysh()
'
' FromKnysh Macro
' Macro recorded 6/05/03 by John
'
Selection.HomeKey Unit:=wdStory
Call zSpaceBeforeAfterCurley
Call zPunctFromLemmata
'Call DeleteLemmataWithinVariants
Call zDeleteExtraSpaces
End Sub
Sub aPrepareCetEntryPrintout()
'
' aPrepareCetEntryPrintout Macro
' Macro recorded 26/05/03 by John
'
'font
Selection.HomeKey Unit:=wdStory
Selection.WholeStory
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
End With
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'remove underlining
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call AllVariantsRed2
'line spacing
Selection.WholeStory
With Selection.ParagraphFormat
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpace1pt5
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
Selection.MoveUp Unit:=wdLine, Count:=1
'remove some cet coding
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "#N+ #L+^p"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<NPG>^p"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "<EL>^p"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
'remove extra paras
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p^p"
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'Call zBlueLemmata
End Sub
Sub zBlueLemmata()
'
' zBlueLemmata Macro
' Macro recorded 4/09/03 by John
'
Selection.HomeKey Unit:=wdStory
'Eliminate spaces
Do
'Find next ]
Selection.Find.ClearFormatting
' Selection.Find.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "]"
.Replacement.text = "&"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=2
'Go to beginning of lemma
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = "&"
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
'select lemma
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\]"
.Replacement.text = "&"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
'colour blue
With Selection.Font
.Color = wdColorBlue
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub zDelComment()
'
' zDelComment Macro
' Macro recorded 26/08/02 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<UB\>\<BDB\>*\<BDE\>\<UE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub DotSelection()
'
' DotSelection Macro
' Macro recorded 6/07/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineDotted
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub DashSelection()
'
' DashSelection Macro
' Macro recorded 6/07/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineDash
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
Sub ThickSelection()
'
' ThickSelection Macro
' Macro recorded 6/07/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineThick
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
Sub EliminateMostSigla()
'
' EliminateMostSigla Macro
' Macro recorded 24/08/03 by John
'
'leaves: BbFi CaLa PaVg BaEs VcWe
Selection.HomeKey Unit:=wdStory
' Call AllVariantsRed2
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorRed
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Underline = wdUnderlineDotted
.Color = wdColorRed
End With
With Selection.Find
.text = "Anb"
.Replacement.text = "Anb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Anm"
.Replacement.text = "Anm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "An"
.Replacement.text = "An"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ceb"
.Replacement.text = "Ceb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Cem"
.Replacement.text = "Cem"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ce"
.Replacement.text = "Ce"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Lab"
' .Replacement.text = "Lab"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'
' With Selection.Find
' .text = "Lam"
' .Replacement.text = "Lam"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'
' With Selection.Find
' .text = "La"
' .Replacement.text = "La"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'
With Selection.Find
.text = "Vbm"
.Replacement.text = "Vbm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vbb"
.Replacement.text = "Vbb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vb"
.Replacement.text = "Vb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Kom"
.Replacement.text = "Kom"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Kob"
.Replacement.text = "Kob"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ko"
.Replacement.text = "Ko"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Unm"
.Replacement.text = "Unm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Unb"
.Replacement.text = "Unb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Un"
.Replacement.text = "Un"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vdm"
.Replacement.text = "Vdm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vdb"
.Replacement.text = "Vdb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vd"
.Replacement.text = "Vd"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Frm"
.Replacement.text = "Frm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Frb"
.Replacement.text = "Frb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fr"
.Replacement.text = "Fr"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Nam"
.Replacement.text = "Nam"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Nab"
.Replacement.text = "Nab"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Na"
.Replacement.text = "Na"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lcm"
.Replacement.text = "Lcm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lcb"
.Replacement.text = "Lcb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lc"
.Replacement.text = "Lc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lbm"
.Replacement.text = "Lbm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lbb"
.Replacement.text = "Lbb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lb"
.Replacement.text = "Lb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Vgm"
' .Replacement.text = "Vgm"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' With Selection.Find
' .text = "Vgb"
' .Replacement.text = "Vgb"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Vg"
' .Replacement.text = "Vg"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vam"
.Replacement.text = "Vam"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vab"
.Replacement.text = "Vab"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Va"
.Replacement.text = "Va"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pcm"
.Replacement.text = "Pcm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pcb"
.Replacement.text = "Pcb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pc"
.Replacement.text = "Pc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sam"
.Replacement.text = "Sam"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sab"
.Replacement.text = "Sab"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sa"
.Replacement.text = "Sa"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pbm"
.Replacement.text = "Pbm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pbb"
.Replacement.text = "Pbb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pb"
.Replacement.text = "Pb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Arm"
.Replacement.text = "Arm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ar"
.Replacement.text = "Ar"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pzm"
.Replacement.text = "Pzm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pzb"
.Replacement.text = "Pzb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pz"
.Replacement.text = "Pz"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Dim"
.Replacement.text = "Dim"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Dib"
.Replacement.text = "Dib"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Di"
.Replacement.text = "Di"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Tom"
.Replacement.text = "Tom"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Tob"
.Replacement.text = "Tob"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "To"
.Replacement.text = "To"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Esm"
' .Replacement.text = "Esm"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Esb"
' .Replacement.text = "Esb"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' With Selection.Find
' .text = "Es"
' .Replacement.text = "Es"
' .Forward = True
'
' .Format = True
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vfm"
.Replacement.text = "Vfm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vfb"
.Replacement.text = "Vfb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vf"
.Replacement.text = "Vf"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Oxm"
.Replacement.text = "Oxm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Oxb"
.Replacement.text = "Oxb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ox"
.Replacement.text = "Ox"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Avm"
.Replacement.text = "Avm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Avb"
.Replacement.text = "Avb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Av"
.Replacement.text = "Av"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Brm"
.Replacement.text = "Brm"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Brb"
.Replacement.text = "Brb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Br"
.Replacement.text = "Br"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDelBlueText()
'
' zDelBlueText Macro
' Macro recorded 15/09/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDelUnderlinedText()
'
' zDelUnderlinedText Macro
' Macro recorded 15/09/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteCet3rdSeriesNotes()
'
' zDeleteCet3rdSeriesNotes Macro
'To delete (-
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "(-"
.Replacement.text = ""
.Forward = True
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'To delete -) {}
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "-\) \{*\}"
.Replacement.text = ""
.Forward = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteCetFormats()
'
' DeleteCetFormats Macro
' Macro recorded 4/30/01 by Kilcullen
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<IB>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDB>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDE>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<IE>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<S/>"
.Replacement.text = "para"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteCrossReferences()
'
' zDeleteCrossReferences Macro
' Macro recorded 1/09/01 by John
'
'protect @lembeg
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "@lembeg"
.Replacement.text = "$lembeg"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Delete @Crossreferences
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "@"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.TypeBackspace
Loop
Selection.HomeKey Unit:=wdStory
'reinstate @lembeg
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "$lembeg"
.Replacement.text = "@lembeg"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteOverlapCoding()
'
' DeleteOverlapCoding Macro
' Macro recorded 5/2/01 by Kilcullen
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\(\*^^?"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "?^^\*\)"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\(\+^^?"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "?^^\+\)"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDelCetSuperCoding()
'
' DelCetSuperCoding Macro
' Macro recorded 22/09/02 by John
'
'Delete superfluous cet coding
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "#N+ #L+"
.Replacement.text = ""
.Forward = True
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "<EL>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .text = "\<IB\>\<BDB\>LIBER *\<IE\>"
' .Replacement.text = ""
' .Forward = True
'
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchAllWordForms = False
' .MatchSoundsLike = False
' .MatchWildcards = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<HRB*HRE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<NPG>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'delete <NP>
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<NP>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "#L- #N-"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove extra empty paragraph
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p^p"
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteCetNote()
'
' zDeleteCetNote Macro
' Macro recorded 14/09/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<1 "
.Replacement.text = "<<<1"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p1>"
.Replacement.text = "^p 1>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = " 1>"
.Replacement.text = "1>>>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<\<\<*\>\>\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zRemoveS1B()
'
' zRemoveS1B Macro
' Macro recorded 15/09/03 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<S1B\>*\<S1E\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteCetQuotationCodes()
'
' zDeleteCetQuotationCodes Macro
' Macro recorded 17/09/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C039}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C096}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C186}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C170}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub NewVariantSelect()
'
' NewVariantSelect Macro
' Macro recorded 18/09/03 by John
'
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="(*"
Application.GoBack
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="*) {}"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub InsertVariantCoding()
'
' z Macro
' Macro recorded 18/09/03 by John
'
Selection.MoveRight Unit:=wdCharacter, Count:=1
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="z"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Application.GoBack
Selection.TypeText text:="(*"
Selection.GoTo What:=wdGoToBookmark, Name:="z"
Selection.GoTo What:=wdGoToBookmark, Name:="z"
Selection.GoTo What:=wdGoToBookmark, Name:="z"
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "pure"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.TypeText text:="*) {}"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub cetCodeBoldandItal()
'
' cetCodeBoldandItal Macro
' Macro created 12/19/99 by Kilcullen
'
'Code Bold
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<BDB>"
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<BDE>"
Loop
'Code Italic
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<IB>"
Selection.Find.ClearFormatting
Selection.Find.Font.Italic = True
With Selection.Find
.text = ""
.Forward = True
.Format = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<IE>"
Loop
'Remove all formatting
Selection.HomeKey Unit:=wdStory
Selection.WholeStory
With Selection.Font
.Bold = False
.Italic = False
End With
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p<IE><BDE>"
.Replacement.text = "<BDE><IE>^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wCorrectOrderBDE()
'
' z Macro
' Macro recorded 21/09/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<IE>^p<BDE>"
.Replacement.text = "<IE><BDE>^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wCorrectOrderBoldItal()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDB><IB>"
.Replacement.text = "<IB><BDB>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<IE><BDE>"
.Replacement.text = "<BDE><IE>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wFormatParas()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p"
.Replacement.text = "^p^p<NPG>^p^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wFormatChapters()
Do
'Find next chapter and copy chapter number
Selection.Find.ClearFormatting
With Selection.Find
.text = "<IB><BDB>Capitulum"
.Replacement.text = "<BDE><IE>"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
'Call WildcardSearch
With Selection.Find
.text = "[0-9]\<"
.Replacement.text = "<BDE><IE>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
'
' Selection.Find.ClearFormatting
' With Selection.Find
' .text = "<IB><BDB>"
' .Replacement.text = "^p"
' .Forward = True
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute
'If Selection.Find.Found = False Then Exit Do
' Selection.MoveRight Unit:=wdCharacter, Count:=1
' Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
' Selection.MoveLeft Unit:=wdWord, Count:=6, Extend:=wdExtend
' Selection.Copy
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.TypeText text:="<EL>"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText text:="#L- #N-"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText text:="#N+ #L+"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.TypeParagraph
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeParagraph
Selection.TypeText text:="<HRB><HRE>"
Selection.MoveLeft Unit:=wdWord, Count:=2
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="Liber INSERT, Capitulum "
Selection.Paste
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.TypeParagraph
Selection.TypeText text:="<NPG>"
Selection.TypeParagraph
Selection.TypeParagraph
Loop
'delete extra NPG before EL
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<NPG>^p^p<EL>"
.Replacement.text = "<EL>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wFindChapterNumber()
'
' wFindChapterNumber Macro
' Macro recorded 21/09/03 by John
'
Selection.Find.ClearFormatting
With Selection.Find
.text = "<IB><BDB>Capitulum"
.Replacement.text = "<BDE><IE>"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
'Call WildcardSearch
With Selection.Find
.text = "[0-9]\<"
.Replacement.text = "<BDE><IE>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
End Sub
Sub Vb()
'
' Vb Macro
' Macro recorded 21/09/03 by John
'
Selection.TypeText text:="VbPbAr "
End Sub
Sub SingleUnderlineSectionNumbers()
'
' SingleUnderlineSectionNumbers Macro
' Macro recorded 2/10/03 by John
'
'Call WildcardSearch
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineSingle
With Selection.Find
.text = "\<s ?\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineSingle
With Selection.Find
.text = "\<s ??\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineSingle
With Selection.Find
.text = "\<s ???\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineSingle
With Selection.Find
.text = "\<s ????\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub SignificantVariant()
'
' SignificantVariant Macro
' Macro recorded 3/10/03 by John
'
Selection.TypeText text:="<UB><BDB>SIGNIFICANT VARIANT?<BDE><UE>"
End Sub
Sub PIB()
'
' PIB Macro
' Macro recorded 7/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "<HRB>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveUp Unit:=wdParagraph, Count:=3
Selection.TypeText text:="<PIB>0 cm<PIE>"
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeText text:="<HSB>16.25 em<HSE>Discipulus"
Selection.MoveDown Unit:=wdParagraph, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\<BDB\>*\<BDE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.TypeText text:="<PIB>0 cm<PIE><BDB>"
Selection.MoveRight Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Range.Case = wdUpperCase
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="<BDE>"
Loop
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDB>Magister:<BDE> "
.Replacement.text = "<PIB>0 cm<PIE><BDB>Magister:<BDE> "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDB>Discipulus:<BDE> "
.Replacement.text = "<PIB>0 cm<PIE><BDB>Discipulus:<BDE> "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<IB><BDB>Capitulum "
.Replacement.text = "Capitulum "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRemoveUnderlined()
'
' RemoveUnderlined Macro
' Macro recorded 7/10/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineSingle
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDotted
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDash
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineWavyDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call wRemoveDotDashUL
Call zDeleteExtraSpaces
Selection.WholeStory
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
End With
Selection.HomeKey Unit:=wdStory
End Sub
Sub wRemoveFileNotes()
'
' wRemoveFileNotes Macro
' Macro recorded 7/10/03 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<1*1\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p^p^p"
.Replacement.text = "^p^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zSpaceSigla()
'
' zSpaceSigla Macro
' Macro recorded 22/09/02 by John
'
Selection.HomeKey Unit:=wdStory
Call AllVariantsRed2
Call wRecolourLemmata
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "An"
.Replacement.text = " An"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "Ar"
.Replacement.text = " Ar"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Av"
.Replacement.text = " Av"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ba"
.Replacement.text = " Ba"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Bb"
.Replacement.text = " Bb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Br"
.Replacement.text = " Br"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ca"
.Replacement.text = " Ca"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ce"
.Replacement.text = " Ce"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Di"
.Replacement.text = " Di"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Es"
.Replacement.text = " Es"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fi"
.Replacement.text = " Fi"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fr"
.Replacement.text = " Fr"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Gs"
.Replacement.text = " Gs"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ko"
.Replacement.text = " Ko"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "La"
.Replacement.text = " La"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lb"
.Replacement.text = " Lb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lc"
.Replacement.text = " Lc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ly"
.Replacement.text = " Ly"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Na"
.Replacement.text = " Na"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ox"
.Replacement.text = " Ox"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pa"
.Replacement.text = " Pa"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pb"
.Replacement.text = " Pb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pc"
.Replacement.text = " Pc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pz"
.Replacement.text = " Pz"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sa"
.Replacement.text = " Sa"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "To"
.Replacement.text = " To"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Un"
.Replacement.text = " Un"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Va"
.Replacement.text = " Va"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vb"
.Replacement.text = " Vb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vc"
.Replacement.text = " Vc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vd"
.Replacement.text = " Vd"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vf"
.Replacement.text = " Vf"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vg"
.Replacement.text = " Vg"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "We"
.Replacement.text = " We"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wMarkLemmata()
'
' wRecolourLemmata Macro
' Macro recorded 9/10/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineWavyDouble
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRecolourLemmata()
'
' wRecolourLemmata Macro
' Macro recorded 9/10/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineWavyDouble
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorPink
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wPreserveQuotes()
'
' wQuarantineQuotes Macro
' Macro recorded 9/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C186}"
.Replacement.text = "=C186$"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C170}"
.Replacement.text = "=C170$"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C096}"
.Replacement.text = "=C096$"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C039}"
.Replacement.text = "=C039$"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRestoreQuotes()
'
' wRestoreQuotes Macro
' Macro recorded 9/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "=C039$"
.Replacement.text = "{C039}"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "=C096$"
.Replacement.text = "{C096}"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "=C170$"
.Replacement.text = "{C170}"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "=C186$"
.Replacement.text = "{C186}"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPara()
'
' zPara Macro
' Macro recorded 9/10/03 by John
'
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Copy
End Sub
Sub wCopyNextPara()
'
' z Macro
' Macro recorded 9/10/03 by John
'
'Copy Next Para
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\<NPG\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Copy
End Sub
Sub wDeUnderlineSpace()
'
' wUnUnderlineSpace Macro
' Macro recorded 9/10/03 by John
'
' to remove underlining of space following }
'dotted heavy
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Underline = wdUnderlineNone
.Color = wdColorAutomatic
End With
With Selection.Find
.text = "} "
.Replacement.text = "}} "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "}}"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
' Double underline
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "} "
.Replacement.text = "}} "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = "}}"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wDeUnderlinePunct()
'
' wDeUnderlinePunct Macro
' Macro recorded 16/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "};"
.Replacement.text = "``;"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "},"
.Replacement.text = "``,"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "}."
.Replacement.text = "``."
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "} "
.Replacement.text = "`` "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "``"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "}:"
.Replacement.text = "``:"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "``"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "}:"
.Replacement.text = "!!:"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "};"
.Replacement.text = "!!;"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "},"
.Replacement.text = "!!,"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "}."
.Replacement.text = "!!."
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "} "
.Replacement.text = "!! "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "} "
.Replacement.text = "!! "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = "!!"
.Replacement.text = "}"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wContUnderline()
'
' wContDotHeavy Macro
' Macro recorded 16/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub InsertAgreements()
'
' InsertAgreements Macro
' Macro recorded 21/10/03 by John
'
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="+\\"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "\"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub wRemoveAgreements()
'
' wRemoveAgreements Macro
' Macro recorded 26/10/03 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "+\\*\\"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRemoveComment()
'
' wRemoveComment Macro
' Macro recorded 26/10/03 by John
'
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<UB\>\<BDB\>*\<BDE\>\<UE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub InvertSigla()
'
' aGroupSigla Macro
' Macro recorded 15/09/02 by John
'Copies sigla in order corresponding to grouping defined by assignment of variables
'leaves old sigla string green, followed by new grouped string blue.
'Bb(FiAnCe) (group A1)
'La(KoCa)UnVd Fr (group A2) REVISED: CaKoLcLaVdFr
'(NaLc) REVISED: delete
'VgVaPcPaLb (group B1) REVISED: PaLbVaVg
'VbSa(PbAr) (group B2) REVISED: VbPbAr
'(Pz(LyGs))
'BaDiToEs (group C)
'VcVf(OxAv)BrWe (group D)
'
'To change grouping, reassign variables or reorder steps in zReorderSigla
'lngQuery = MsgBox("Supposes that whole passage has been copied to Source.doc." _
'& vbCr & "Source.doc and process.doc must be open." _
'& vbCr & vbCr & "Continue?", vbYesNo + vbQuestion, "Continue?")
'If lngQuery = vbNo Then End
'
'Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
' Call wPreserveQuotes
'Call wMarkLemmata
'Call zSpaceSigla
Call AllVariantsRed2
Call wwMarkSigla
Call AGroupSiglaCleanUp
Selection.HomeKey Unit:=wdStory
Call zMarkSigla
Selection.HomeKey Unit:=wdStory
Call zDeMarkHash
Call zDeUnderlineMarks
Selection.HomeKey Unit:=wdStory
Do
Windows("source.doc").Activate
ActiveDocument.Save
'Copy Next Para
'Call WildcardSearch
Selection.Find.ClearFormatting
With Selection.Find
.text = "*\<NPG\>"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Copy
Windows("process.doc").Activate
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Paste
Selection.HomeKey Unit:=wdStory
Do
'find next |
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
' Selection.Find.Font.Color = wdColorAutomatic
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Call wwCheckSigla
Loop
'transfer output to source
Selection.WholeStory
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Windows("source.doc").Activate
Selection.Paste
Loop
Call zRecolourStrings
Call zDeleteExtraSpaces
Call wRestoreQuotes
Call wwDeMarkSigla
Call wRecolourLemmata
Call wwRecolourStrings
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "`"
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wwCheckSigla()
'
' zReorderSigla Macro
' Macro recorded 11/09/02 by John
'Bb (Fi An Ce) (group 1)
'(Fr La (Ko Ca) Un Vd) (group 2)
'(Na Lc) (Vg Va Pc Pa) Lb Vb Sa (Pb Ar) (group 3)
'(Pz (Ly Gs)) (group 4)
'Ba Di To Es (group 5)
'Vc Vf (Ox Av) Br We (group 6)
'
'To change grouping, reassign variables
'comment out parts referring to sigla not found in file to be processed
strSiglum1 = "Bb"
strSiglum2 = "Fi"
strSiglum3 = "An"
strSiglum4 = "Ce"
strSiglum5 = "Ca"
strSiglum6 = "Ko"
strSiglum7 = "Lc"
strSiglum8 = "La"
'strSiglum9 = "Un"
strSiglum10 = "Vd"
strSiglum11 = "Fr"
'strSiglum12 = "Pc"
strSiglum13 = "Pa"
strSiglum14 = "Lb"
strSiglum15 = "Va"
strSiglum16 = "Vg"
strSiglum17 = "Vb"
'strSiglum18 = ""
'correction made below
strSiglum19 = "Sa"
strSiglum20 = "Pb"
strSiglum21 = "Ar"
strSiglum22 = "Pz"
strSiglum23 = "Ly"
'strSiglum24 = "Gs"
strSiglum25 = "Ba"
strSiglum26 = "Di"
strSiglum27 = "To"
strSiglum28 = "Es"
strSiglum29 = "Vc"
strSiglum30 = "Vf"
strSiglum31 = "Ox"
strSiglum32 = "Av"
strSiglum33 = "Br"
strSiglum34 = "We"
strSiglum = strSiglum1 'Bb
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum2 'Fi
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum3 'An
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum4 'Ce
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum5 'Ca
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum6 'Ko
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum7 'Lc
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum8 'La
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum9 'Un
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum10 'Vd
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum11 'Fr
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum13 'Pa
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum14 'Lb
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum15 'Va
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum16 'Vg
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum17 'Vb
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum19 'Sa
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum20 'Pb
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum21 'Ar
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum22 'Pz
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum23 'Ly
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum24 'Gs
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum25 'Ba
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum26 'Di
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum27 'To
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum28 'Es
Call wwRecordAbsenceOfSiglum
'separating space
Selection.TypeText text:=" "
strSiglum = strSiglum29 'Vc
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum30 'Vf
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum31 'Ox
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum32 'Av
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum33 'Br
Call wwRecordAbsenceOfSiglum
strSiglum = strSiglum34 'We
Call wwRecordAbsenceOfSiglum
Call zRecolourStrings
End Sub
Sub wwRecordAbsenceOfSiglum()
'
' zFindSiglum Macro
' Macro recorded 15/09/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "%" & strSiglum
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = True Then GoTo Finish
' Selection.MoveLeft Unit:=wdCharacter, Count:=1
' Selection.MoveRight Unit:=wdCharacter, Count:=1
''copy siglum, siglum+b or siglum+m
' Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
' Selection.Copy
''return to |
' Selection.MoveRight Unit:=wdCharacter, Count:=1
'
' Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorRed
' With Selection.Find
' .text = "|"
' .Replacement.text = ""
' .Forward = True
' .Format = True
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute
' Selection.MoveLeft Unit:=wdCharacter, Count:=1
'paste in siglum+, delete extra spaces
Selection.TypeText text:=strSiglum
'Selection.TypeBackspace
' Selection.MoveLeft Unit:=wdWord, Count:=1
'Selection.TypeBackspace
' Selection.MoveRight Unit:=wdWord, Count:=1
GoTo Lastline
Finish:
'return to |
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Lastline:
End Sub
Sub wwwRecordAbsenceOfSiglum()
'
' zFindSiglum Macro
' Macro recorded 15/09/02 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = " " & strSiglum
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = True Then GoTo Finish
' Selection.MoveLeft Unit:=wdCharacter, Count:=1
' Selection.MoveRight Unit:=wdCharacter, Count:=1
'
''copy siglum, siglum+b or siglum+m
' Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
' Selection.Copy
'return to |
' Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'paste in siglum+, delete extra spaces
Selection.TypeText text:=strSiglum
' Selection.Paste
' Selection.TypeBackspace
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
Finish:
End Sub
Sub wwRecolourStrings()
'
' wwRecolourStrings Macro
' Macro recorded 26/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorGreen
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorBlue
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorOrange
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wwMarkSigla()
'
' zSpaceSigla Macro
' Macro recorded 22/09/02 by John
'
Selection.HomeKey Unit:=wdStory
Call wwAutocols
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "An"
.Replacement.text = "%An"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "Ar"
.Replacement.text = "%Ar"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Av"
.Replacement.text = "%Av"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ba"
.Replacement.text = "%Ba"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Bb"
.Replacement.text = "%Bb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Br"
.Replacement.text = "%Br"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ca"
.Replacement.text = "%Ca"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ce"
.Replacement.text = "%Ce"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Di"
.Replacement.text = "%Di"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Es"
.Replacement.text = "%Es"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fi"
.Replacement.text = "%Fi"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fr"
.Replacement.text = "%Fr"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Gs"
.Replacement.text = "%Gs"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ko"
.Replacement.text = "%Ko"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "La"
.Replacement.text = "%La"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lb"
.Replacement.text = "%Lb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lc"
.Replacement.text = "%Lc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ly"
.Replacement.text = "%Ly"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Na"
.Replacement.text = "%Na"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ox"
.Replacement.text = "%Ox"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pa"
.Replacement.text = "%Pa"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pb"
.Replacement.text = "%Pb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pc"
.Replacement.text = "%Pc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pz"
.Replacement.text = "%Pz"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sa"
.Replacement.text = "%Sa"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "To"
.Replacement.text = "%To"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Un"
.Replacement.text = "%Un"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Va"
.Replacement.text = "%Va"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vb"
.Replacement.text = "%Vb"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vc"
.Replacement.text = "%Vc"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vd"
.Replacement.text = "%Vd"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vf"
.Replacement.text = "%Vf"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vg"
.Replacement.text = "%Vg"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "We"
.Replacement.text = "%We"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ww"
.Replacement.text = "%Ww"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "% "
.Replacement.text = "%"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wwDeMarkSigla()
'
' wwDeMarkSigla Macro
' Macro recorded 26/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorGreen
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "%"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wAutocolAgreements()
'
' wAutocolAgreements Macro
' Macro recorded 26/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
'Call WildcardSearch
With Selection.Find
.text = "+\\*\\"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRemovePunctShouldHaveBeenUnderlined()
'
' z Macro
' Macro recorded 26/10/03 by John
'
With Selection.Find
.text = ",,"
.Replacement.text = ","
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = ";;"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ",}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = ";}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Application.Browser.Previous
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{,"
.Replacement.text = "{"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{;"
.Replacement.text = "{"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub WavyUSel()
'
' z Macro
' Macro recorded 26/10/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineWavy
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
Sub wwWavyAutocol()
'
' wwWavyAutocol Macro
' Macro recorded 26/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineWavy
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub ColBb()
'
' ColBb Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:red""> </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
End Sub
Sub ColCa()
'
' ColCa Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:lime""> </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
Sub ColBa()
'
' ColBa Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:fuchsia""> </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
Sub ColVc()
'
' ColVc Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:yellow""> </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
Sub ColPa()
'
' ColPa Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:aqua""> </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
Sub wCetBDI2HTML()
'
' wCetBDI2HTML Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<BDB>"
.Replacement.text = "<strong>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "<BDE>"
.Replacement.text = "</strong>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "<IB>"
.Replacement.text = "<em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "<IE>"
.Replacement.text = "</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub ColAlterTr()
'
' ColAlterTr Macro
' Macro recorded 27/10/03 by John
'
Selection.TypeText text:="<span style=""background:#FFC6A5"">"
Selection.TypeText text:=" </span>"
Selection.MoveLeft Unit:=wdWord, Count:=3, Extend:=wdExtend
Selection.Cut
Selection.MoveRight Unit:=wdWord, Count:=1
End Sub
Sub wReverseWw()
'
' wReverseWe Macro
' Macro recorded 27/10/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDash
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Underline = wdUnderlineNone
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Ww"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wRemoveSpacingCodes()
'
' wRemoveSpacingCodes Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<HSB\>*\<HSE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<PIB\>*\<PIE\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wNumberVariants()
'
' wNumberVariants Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = "[<a name=""a$"">@</a>]{"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call aaAutonum
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "$"
.Replacement.text = "@"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call aaAutonum
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "name=""a "
.Replacement.text = "name=""a"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = """> "
.Replacement.text = """>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wImplementQuotationCodes()
'
' wImplementQuotationCodes Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C186}"
.Replacement.text = """"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C170}"
.Replacement.text = """"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C096}"
.Replacement.text = "'"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "{C039}"
.Replacement.text = "'"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vColourSigla()
'
' zSpaceSigla Macro
' Macro recorded 22/09/02 by John
'
Selection.HomeKey Unit:=wdStory
Call zPreserveNamAn
Call AllVariantsRed2
'Call wRecolourLemmata
Call vvColourSigla
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'clean up
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "`"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "~"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call zRestoreNamAn
Call ColAltTr
End Sub
Sub vvColourSigla()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "An"
.Replacement.text = "<span style=""background:red"">An</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "Ar"
.Replacement.text = "<span style=""background:aqua"">Ar</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Av"
.Replacement.text = "<span style=""background:yellow"">Av</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ba"
.Replacement.text = "<span style=""background:fuchsia"">Ba</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Bb"
.Replacement.text = "<span style=""background:red"">Bb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Br"
.Replacement.text = "<span style=""background:yellow"">Br</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ca"
.Replacement.text = "<span style=""background:lime"">Ca</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ce"
.Replacement.text = "<span style=""background:red"">Ce</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Di"
.Replacement.text = "<span style=""background:fuchsia"">Di</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Es"
.Replacement.text = "<span style=""background:fuchsia"">Es</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fi"
.Replacement.text = "<span style=""background:red"">Fi</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fr"
.Replacement.text = "<span style=""background:lime"">Fr</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ko"
.Replacement.text = "<span style=""background:lime"">Ko</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "La"
.Replacement.text = "<span style=""background:lime"">La</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lb"
.Replacement.text = "<span style=""background:aqua"">Lb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lc"
.Replacement.text = "<span style=""background:lime"">Lc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ly"
.Replacement.text = "<span style=""background:aqua"">Ly</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Na"
.Replacement.text = "<span style=""background:lime"">Na</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ox"
.Replacement.text = "<span style=""background:yellow"">Ox</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pa"
.Replacement.text = "<span style=""background:aqua"">Pa</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pb"
.Replacement.text = "<span style=""background:aqua"">Pb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pc"
.Replacement.text = "<span style=""background:aqua"">Pc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pz"
.Replacement.text = "<span style=""background:aqua"">Pz</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sa"
.Replacement.text = "<span style=""background:aqua"">Sa</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "To"
.Replacement.text = "<span style=""background:fuchsia"">To</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Un"
.Replacement.text = "<span style=""background:lime"">Un</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Va"
.Replacement.text = "<span style=""background:aqua"">Va</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vb"
.Replacement.text = "<span style=""background:aqua"">Vb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vc"
.Replacement.text = "<span style=""background:yellow"">Vc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vd"
.Replacement.text = "<span style=""background:lime"">Vd</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vf"
.Replacement.text = "<span style=""background:yellow"">Vf</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vg"
.Replacement.text = "<span style=""background:aqua"">Vg</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "We"
.Replacement.text = "<span style=""background:yellow"">We</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vvvColourSigla()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "An"
.Replacement.text = "<span style=""background:red"">An</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Ar"
.Replacement.text = "<span style=""background:aqua"">Ar</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Av"
.Replacement.text = "<span style=""background:yellow"">Av</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ba"
.Replacement.text = "<span style=""background:fuchsia"">Ba</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Bb"
.Replacement.text = "<span style=""background:red"">Bb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Br"
.Replacement.text = "<span style=""background:yellow"">Br</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ca"
.Replacement.text = "<span style=""background:lime"">Ca</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ce"
.Replacement.text = "<span style=""background:red"">Ce</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Di"
.Replacement.text = "<span style=""background:fuchsia"">Di</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Es"
.Replacement.text = "<span style=""background:fuchsia"">Es</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fi"
.Replacement.text = "<span style=""background:red"">Fi</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Fr"
.Replacement.text = "<span style=""background:lime"">Fr</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ko"
.Replacement.text = "<span style=""background:lime"">Ko</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "La"
.Replacement.text = "<span style=""background:lime"">La</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lb"
.Replacement.text = "<span style=""background:aqua"">Lb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Lc"
.Replacement.text = "<span style=""background:lime"">Lc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ly"
.Replacement.text = "<span style=""background:aqua"">Ly</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Na"
.Replacement.text = "<span style=""background:lime"">Na</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Ox"
.Replacement.text = "<span style=""background:yellow"">Ox</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pa"
.Replacement.text = "<span style=""background:aqua"">Pa</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pb"
.Replacement.text = "<span style=""background:aqua"">Pb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pc"
.Replacement.text = "<span style=""background:aqua"">Pc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Pz"
.Replacement.text = "<span style=""background:aqua"">Pz</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Sa"
.Replacement.text = "<span style=""background:aqua"">Sa</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "To"
.Replacement.text = "<span style=""background:fuchsia"">To</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Un"
.Replacement.text = "<span style=""background:lime"">Un</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Va"
.Replacement.text = "<span style=""background:aqua"">Va</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vb"
.Replacement.text = "<span style=""background:aqua"">Vb</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vc"
.Replacement.text = "<span style=""background:yellow"">Vc</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vd"
.Replacement.text = "<span style=""background:lime"">Vd</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vf"
.Replacement.text = "<span style=""background:yellow"">Vf</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "Vg"
.Replacement.text = "<span style=""background:aqua"">Vg</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "We"
.Replacement.text = "<span style=""background:yellow"">We</span>"
.Forward = True
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveDocument.Save
Call zElimSpaceBetweenSpans
End Sub
Sub vRemoveUnderlineWithinVariants()
'
' vRemoveUnderlineWithinVariants Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = "}^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "{"
.Replacement.text = "}^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "}^p"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zDeleteExtraSpaces()
'
' DeleteExtraSpaces Macro
' Macro recorded 1/23/00 by Kilcullen
'
'Make sure that there is a space before (,{,[ and after ),},]
'(a) find every (, whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "("
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'Insert before ( a non-underlined space
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'(b) find every ), whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = ")"
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'insert after ) a non-underlined space
Selection.MoveRight Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Loop
'(c) find every [, whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "["
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'insert before [ a non-underlined space
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'(c) find every ], whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "]"
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'insert after ] a non-underlined space
Selection.MoveRight Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Loop
'Find every {, whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'insert before { a non-underlined space
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'Find every }, whatever format
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'insert after } a non-underlined space
Selection.MoveRight Unit:=wdCharacter, Count:=1
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.TypeText text:=" "
Loop
'replace four spaces with one
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'replace three spaces with one
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'replace two spaces with one
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'replace space comma with comma
'find every space+comma
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " ,"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
'delete space
Selection.MoveLeft Unit:=wdCharacter, Count:=1
' Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'replace space full stop with full stop
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " ."
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'replace space; with ;
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " ;"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'replace space: with :
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " :"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'space before {C186}
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " {C186}"
.Replacement.text = "{C186}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'space before {C039}
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " {C039}"
.Replacement.text = "{C039}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'space after C170
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C170} "
.Replacement.text = "{C170}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'space after C096
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "{C096} "
.Replacement.text = "{C096}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'space before asterisk
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " *"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
' Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'space after asterisk
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = "* "
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'space before dash
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " -"
.Replacement.text = "-"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'space after dash
Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "- "
.Replacement.text = "-"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
'[+space
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = "[ "
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
' space]
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " ]"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'( Round bracket +space
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = "( "
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
' space+) space+round bracket
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " )"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'{+space brace+space
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = "{ "
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
' space+} space+brace
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Do
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " }"
.Replacement.text = ";"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1
Loop
'remove space at beginning of paras
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p "
.Replacement.text = "^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'space between ){
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "){"
.Replacement.text = ":"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:=" "
Loop
Selection.HomeKey Unit:=wdStory
End Sub
Sub zStandardiseBracketUnderlines()
'
' zStandardiseBracketUnderlines Macro
' Macro recorded 4/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineNone
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineNone
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "{"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDouble
.Color = wdColorAutomatic
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vvFindUnderlinedBrackets()
'
' vvFindNonUnderlinedBrackets Macro
' Macro recorded 4/11/03 by John
'
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X = 3 Then End
If X = 20 Then End
X = 0
'find next }
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
X = Selection.Range.Underline
If X = 3 Then End
If X = 20 Then End
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vvFindNonDULBrackets()
'
' vvFindNonUnderlinedBrackets Macro
' Macro recorded 4/11/03 by John
'
'Double underlined
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDouble
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X <> 3 Then End
X = 0
'find next }
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
X = Selection.Range.Underline
If X <> 3 Then End
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vvFindNonULDHBrackets()
'
' vvFindNonUnderlinedBrackets Macro
' Macro recorded 4/11/03 by John
'
'Double underlined
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X <> 20 Then End
X = 0
'find next }
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
X = Selection.Range.Underline
If X <> 20 Then End
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub wwRemoveGroupSigla()
'
' wwRemoveGroupSigla Macro
' Macro recorded 5/11/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "/A1/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/A2/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/B1/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/B2/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/B3/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/AllB/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "/C/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "/D/"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPreserveNamAn()
'
' PreserveNamAn Macro
' Macro created 4/6/01 by John Kilcullen
'
'Protect NamAn
'Call AllVariantsRed2
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Nam"
.Replacement.text = "N12AM"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Aris"
.Replacement.text = "A12Ris"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "An"
.Replacement.text = "A12N"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Return colour to auto
'Selection.WholeStory
' With Selection.Font
' .Color = wdColorAutomatic
' End With
'Call AutoColour
Selection.HomeKey Unit:=wdStory
End Sub
Sub zRestoreNamAn()
'
' ReplaceNam Macro
' Macro created 4/6/01 by John Kilcullen
'
'Replace NAM with Nam, AN with An
Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "N12AM"
.Replacement.text = "Nam"
.Forward = True
.Format = False
.MatchCase = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "A12N"
.Replacement.text = "An"
.Forward = True
.Format = False
.MatchCase = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorAutomatic
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "A12Ris"
.Replacement.text = "Aris"
.Forward = True
.Format = False
.MatchCase = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vvUnderlinePunct()
'
' vvUnderlinePunct Macro
' Macro recorded 4/11/03 by John
'http://www.vba-programmer.com/
'X = Selection.Range.ListFormat.ListType To detect a bullet the value is "2"
'open watch window to find the value of the format being looked for
'
Selection.HomeKey Unit:=wdStory
StageA:
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = ","
.Replacement.text = "^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X = 3 Then GoTo Dul
If X = 20 Then GoTo Uldh
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageA
Dul:
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageA
Uldh:
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
StageB:
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = ";"
.Replacement.text = "^p"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X = 3 Then GoTo DulB
If X = 20 Then GoTo UldhB
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageB
DulB:
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Bold = True
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageB
UldhB:
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Bold = True
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vwNonULAsterisks()
'
' vwNonUHDLAsterisks Macro
' Macro recorded 5/11/03 by John
'
'find *)
Selection.HomeKey Unit:=wdStory
StageA:
Do
X = 0
Selection.Find.ClearFormatting
With Selection.Find
.text = "*)"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
'Find same )
Selection.Find.ClearFormatting
With Selection.Find
.text = ")"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
'test underlining
X = Selection.Range.Underline
If X = 3 Then GoTo DulA
If X = 20 Then GoTo UldhA
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageA
DulA:
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Find.ClearFormatting
With Selection.Find
.text = "*"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDouble
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
GoTo StageA
UldhA:
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Find.ClearFormatting
With Selection.Find
.text = "*"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineDottedHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vwFindUnderlinedReferenceBrackets()
'
' vvFindNonUnderlinedBrackets Macro
' Macro recorded 4/11/03 by John
'
Do
X = 0
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
With Selection.Find
.text = "+)"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
X = Selection.Range.Underline
If X = 3 Then End
If X = 20 Then End
X = 0
'find next }
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
X = Selection.Range.Underline
If X = 3 Then End
If X = 20 Then End
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vvRemoveSpacesBetweenSigla()
Call AllVariantsRed2
Call zDeRedRefs
Call wwMarkSigla 'inserts %
Call zMarkSigla
Call zRedSigla2
Call vvRemoveRedSpaces
Call wvCleanUpSigla
Call zRed2Auto
End Sub
Sub vvRemoveRedSpaces()
'
' vvRemoveRedSpaces Macro
' Macro recorded 9/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vvRemoveGreenSpaces()
'
' vvRemoveRedSpaces Macro
' Macro recorded 9/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorGreen
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wvCleanUpSigla()
'
' wvCleanUpSigla Macro
' Macro recorded 9/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
' Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "%"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "`"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "|"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "~"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " |}"
.Replacement.text = "}"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vvAutocolLemmata()
'
' vvAutocolLemmata Macro
' Macro recorded 9/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineWavyDouble
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Underline = wdUnderlineWavyDouble
.Color = wdColorAutomatic
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub wwAutocols()
Call zPositiveApparatAutocol
Call wAutocolAgreements
Call vvAutocolLemmata
End Sub
Sub zRed2Auto()
'
' z Macro
' Macro recorded 9/11/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPositiveApparatGreen()
'
' zPositiveApparatAutocol Macro
' Macro recorded 14/09/02 by John
Call AllVariantsRed2
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ":"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorGreen
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub vvRemoveSpacesPositiveApparat()
Call zPositiveApparatGreen
Call vvRemoveGreenSpaces
Selection.WholeStory
With Selection.Font
.Color = wdColorAutomatic
End With
Selection.MoveUp Unit:=wdLine, Count:=1
End Sub
Sub vvDeunderlinePositiveColon()
'
' vvDeunderlinePositiveColon Macro
' Macro recorded 9/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineNone
.Color = wdColorSkyBlue
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorSkyBlue
With Selection.Find
.text = ": "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineWavy
.Color = wdColorSkyBlue
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorSkyBlue
With Selection.Find
.text = ": "
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Underline = wdUnderlineNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub PreTable2()
'
' z Macro
' Macro recorded 27/10/03 by John
'
Selection.HomeKey Unit:=wdStory
Call vColourSigla
Call wNumberVariants
End Sub
Sub PrePDF()
'
' PrePDF Macro
' Macro recorded 1/01/03 by John
Selection.HomeKey Unit:=wdStory
Call zPreserveNamAn
Call wPreserveQuotes
Call wRemoveAgreements
Call wwRemoveGroupSigla
Call wRemoveFileNotes
Call wRemoveComments
Call vvDeunderlinePositiveColon
Call zStandardiseBracketUnderlines
'Call AllVariantsRed
Call AllVariantsRed2
Call EliminateMostSigla
Call zPunctFromLemmata
Call wRemoveUnderlined
Call wRemovePunctShouldHaveBeenUnderlined
Call zMedievalSpelling
Call zDeleteExtraSpaces
Call zRemoveExtraSpaceAfterXR
Call zNLparagraph
Call zRestoreNamAn
'Call vvRemoveSpacesBetweenSigla
'Call vvRemoveSpacesPositiveApparat
Call wRestoreQuotes
Call zDeleteExtraSpaces
End Sub
Sub zRemoveExtraSpaceAfterXR()
'Extra space after XR
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "@ "
.Replacement.text = "@"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zNLparagraph()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "#N+ #L+^p"
.Replacement.text = "#N+ #L+^p^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "#N+ #L+^p^p^p"
.Replacement.text = "#N+ #L+^p^p"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub WildcardSearch()
Set myWorkingRange = ActiveDocument.Range
'call a routine that removes any previous settings from the find dialog
Call ClearFindAndReplaceParameters
myWorkingRange.Find.Execute FindText:="[!^013]", _
MatchWildcards:=True, Forward:=True
'exit sub if search is successful
If myWorkingRange.Find.Found Then
MsgBox "tell the user something"
Call ClearFindAndReplaceParameters
Exit Sub
End If
'this is a dummy search because otherwise
'subsequent searches will break down
'somehow this search flushes the bad karma
'and lets subsequent searches function
myWorkingRange.Find.Execute FindText:="^p", _
MatchWildcards:=False
'call a routine that removes all settings from the find dialog
'so future users of the dialog won't get strange results
Call ClearFindAndReplaceParameters
End Sub
Sub ClearFindAndReplaceParameters()
'From: http://www.mvps.org/word/FAQs/MacrosVBA/ClearFind.htm
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.text = ""
.Replacement.text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
End Sub
Sub RepeatFind()
'Source: http://www.mvps.org/word/FAQs/MacrosVBA/FlushPartialFindBug.htm
Select Case Application.Browser.Target
Case wdBrowseFind
Selection.Find.Execute Wrap:=wdFindAsk
Case Else
WordBasic.ToolsMacro Name:="RepeatFind", Run:=1, Show:=2
End Select
End Sub
Sub zDeleteCet2ndSeriesNotes()
'
' zDeleteCet3rdSeriesNotes Macro
'To delete (+
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "(+"
.Replacement.text = ""
.Forward = True
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'To delete +) {}
'Call WildcardSearch
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "+\) \{*\}"
.Replacement.text = ""
.Forward = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub ColAltTr()
'
' ColAltTr Macro
' Macro recorded 16/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Call wwRemoveGroupSigla
'insert background before ![
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "!["
.Replacement.text = "!<span style=background:#FFC6A5>!["
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "]!"
.Replacement.text = "]!</span>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "!!"
.Replacement.text = "![]!"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub vNumberVariants()
'
' vNumberVariants Macro
' Macro recorded 16/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "{"
.Replacement.text = "[@]{"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run MacroName:="aaAutonum"
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.text = "[ "
.Replacement.text = "["
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub DotDashHUL()
'
' DotDashHUL Macro
' Macro recorded 17/11/03 by John
'
With Selection.Font
.Underline = wdUnderlineDotDashHeavy
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub PreTable()
'
' PreTable3 Macro
' Macro recorded 14/11/03 by John
'
Call wRemoveAgreements
Call wRemoveComments
Call wRemoveFileNotes
Call wRemoveSpacingCodes
Call zDeleteCet2ndSeriesNotes
'Call zDeleteCet3rdSeriesNotes
Call zDeleteCrossReferences
Call wReverseWw
'Call wRemovePunctShouldHaveBeenUnderlined
Call zMedievalSpelling
'remove autocoloured underlining
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineSingle
.Color = wdColorAutomatic
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineDouble
.Color = wdColorAutomatic
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
With Selection.Find.Font
.Underline = wdUnderlineDottedHeavy
.Color = wdColorAutomatic
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call AllVariantsRed2
'remove remaining skyblue (i.e. positive apparatus for deleted variants
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorSkyBlue
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove pink (lemmata for deleted variants)
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPink
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Call wRestoreQuotes
Call wImplementQuotationCodes
'colour surviving positive apparatus sky blue
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDottedHeavy
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorSkyBlue
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'colour surviving lemmata pink
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineWavyDouble
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorPink
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove extra spaces
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p "
.Replacement.text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove hyphenation codes
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<HB*HE\>"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call zMedievalSpelling
Call wCetBDI2HTML
Call zDelCetSuperCoding
End Sub
Sub PreTablez()
'
' PrePDF Macro
' Macro recorded 1/01/03 by John
'
Selection.HomeKey Unit:=wdStory
Call vRemoveUnderlineWithinVariants
Call wRemoveUnderlined
Selection.HomeKey Unit:=wdStory
Call wRemoveSpacingCodes
Call wImplementQuotationCodes
Call wRemoveAgreements
Call wReverseWw
Call wRemoveFileNotes
Call wRemoveComments
'Call zPunctFromLemmata
'Call DeleteLemmataWithinVariants
Call wRemovePunctShouldHaveBeenUnderlined
Call zMedievalSpelling
Call wCetBDI2HTML
Call zDelCetSuperCoding
Selection.HomeKey Unit:=wdStory
'Call wRemoveSpacingCodes
Call zDeleteExtraSpaces
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.TypeText text:="<NPG>"
Selection.TypeParagraph
Call InvertSigla
End Sub
Sub GreenGold()
'
' GreenGold Macro
' Macro recorded 28/11/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = True
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorGold
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.Copy
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = True
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorBrightGreen
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:=" "
Selection.Paste
End Sub
Sub zDeBluePositiveApparat()
'
' zDeBluePositiveApparat Macro
' Macro recorded 28/11/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorSkyBlue
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Underline = wdUnderlineNone
.Color = wdColorAutomatic
End With
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub NoVar()
'
' NoVar Macro
' Macro recorded 28/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "!"
.Replacement.text = "Z"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Z\<span*span\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Z\[*\]Z"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
With Selection.Find
.text = "\{*\}"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<span*span\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\[\<a name*a\>\]"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "(*"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "*)"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "(-"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "-)"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub DashedUL()
'
' DashedUL Macro
' Macro recorded 28/11/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineDash
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
End Sub
Sub wRemoveDotDashUL()
'
' wRemoveDotDashUL Macro
' Macro recorded 28/11/03 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineDotDashHeavy
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zPositiveApparatBlue()
'
' zPositiveApparatAutocol Macro
' Macro recorded 14/09/02 by John
'
Do
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ":"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorRed
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = False
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection.Font
.Color = wdColorBlue
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Loop
End Sub
Sub Green()
'
' Green Macro
' Macro recorded 30/11/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = True
.Italic = False
.Underline = wdUnderlineDottedHeavy
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorBrightGreen
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub Gold()
'
' Gold Macro
' Macro recorded 30/11/03 by John
'
With Selection.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorGold
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub
Sub NumbercetFootnotes()
'
' NumbercetFootnotes Macro
' Macro recorded 1/12/03 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "@"
.Replacement.text = "$"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<RB>$"
.Replacement.text = "<RB>@"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run MacroName:="aaAutonum"
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<RB> "
.Replacement.text = "<RB>"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "$"
.Replacement.text = "@"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub ANAME()
'
' ANAME Macro
' Macro recorded 7/12/03 by John
'
Selection.Copy
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.text = "(*"
.Replacement.text = "?"
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeParagraph
Selection.TypeParagraph
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeText text:="<a name="""
Selection.Paste
Selection.TypeText text:="|""></a>"
Selection.Find.ClearFormatting
With Selection.Find
.text = """ "
.Replacement.text = "?"
.Forward = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.TypeText text:=""""
Selection.MoveUp Unit:=wdParagraph, Count:=1
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
With Selection.Font
.Underline = wdUnderlineWavyHeavy
.Color = wdColorAutomatic
End With
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.TypeBackspace
'Reset find
Selection.Find.ClearFormatting
With Selection.Find
.text = "(*"
.Replacement.text = "?"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
Sub ProcessCollation()
'
' ProcessCollation Macro
' Macro recorded 18/01/04 by John
'
lngQuery = MsgBox("Copy collation to source.doc, open process.doc." _
& vbCr & "Decide what string to treat as Ww, or Ww+?." _
& vbCr & "amend ZWw if necessary" _
& vbCr & vbCr & "Note that if spans are removed a space must be left between sigla," _
& vbCr & "since vvvColourSigla treats each siglum as a whole word." _
& vbCr & vbCr & "Continue?", vbYesNo + vbQuestion, "Continue?")
If lngQuery = vbNo Then End
Call zWw
'prelim cleanup
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "REPEATED"
.Replacement.text = "?"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.EscapeKey
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "repeated added"
.Replacement.text = "<em>repeated</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "indecipherable"
.Replacement.text = "illegible"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'format block numbers
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<"
.Replacement.text = "<br@@<"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = ">"
.Replacement.text = ">"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "@@"
.Replacement.text = ">"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'html top and bottom
Selection.HomeKey Unit:=wdStory
Selection.TypeText text:="<html>"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText text:="<head>"
Selection.TypeParagraph
Selection.TypeText text:="<title> part 1 prologue and book 1"
Selection.MoveLeft Unit:=wdWord, Count:=6
Selection.TypeText text:="collation 1 Dial 1"
Selection.MoveRight Unit:=wdWord, Count:=6, Extend:=wdExtend
Selection.TypeBackspace
Selection.TypeParagraph
Selection.TypeText text:="</title>"
Selection.TypeParagraph
Selection.TypeText text:="</head>"
Selection.TypeParagraph
Selection.TypeText text:= _
"<body bgcolor=""white"" text=""black"" link=""red"" vlink=""#7F0000"
Selection.TypeText text:=""">" & Chr(11) & "<h1 align=center>"
Selection.TypeParagraph
Selection.TypeText text:="WILLIAM OF OCKHAM "
Selection.TypeText text:= _
", <EM>DIALOGUS</EM>, part 1, prologue and book 1</h1>"
Selection.TypeParagraph
Selection.TypeText text:="<br>as at July 2004</h2>"
Selection.MoveLeft Unit:=wdWord, Count:=7
Selection.TypeText text:="<h2 align=center>"
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeParagraph
Selection.TypeText text:="<p>"
Selection.TypeParagraph
Selection.TypeText text:= _
"<font size=-3>Copyright © 2004, The British Academy</fo"
Selection.TypeText text:="nt><p><hr><p>"
Selection.EndKey Unit:=wdStory
Selection.TypeText text:= _
"<p>Return to <A HREF=""wtc.html#part1b"">Table of Contents</a>"
Selection.TypeText text:="<p></body></html>"
Selection.HomeKey Unit:=wdStory
'put target code at the beginning of each line of collation
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = " ]"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.MoveUp Unit:=wdParagraph, Count:=1
Selection.TypeText text:="<a name=""@"">[$"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText text:="]</a> "
Selection.MoveDown Unit:=wdParagraph, Count:=1
Loop
Selection.HomeKey Unit:=wdStory
Call aaAutonum
Selection.HomeKey Unit:=wdStory
'give each line a visible number
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "$"
.Replacement.text = "@"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call aaAutonum
Selection.HomeKey Unit:=wdStory
'clean up
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = """> "
.Replacement.text = """>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ">[ "
.Replacement.text = ">["
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "[/com] [com]"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "[/m] [m]"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "[/b] [b]"
.Replacement.text = " "
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call zCommentsAddOm 'inserts italics
'begin lines
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "<a name"
.Replacement.text = "<br><a name"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveDocument.Save
Call zBoldSingleWordLemmata
ActiveDocument.Save
Call vvvColourSigla
'fix missing inclusions
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ">...<br><"
.Replacement.text = ">...<"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'remove colour on +PC
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Ww+<span style=""background:aqua"">Pc</span>"
.Replacement.text = "Ww+Pc"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveDocument.Save
'Do
' Selection.Find.ClearFormatting
' With Selection.Find
' .text = "a name =s "
' .Replacement.text = ""
' .Forward = True
' .Format = False
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute
'If Selection.Find.Found = False Then Exit Do
'
' Selection.MoveRight Unit:=wdCharacter, Count:=1
'
' Selection.Find.ClearFormatting
' With Selection.Find
' .text = ">"
' .Replacement.text = ""
' .Forward = True
' .Format = False
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' Selection.Find.Execute
' Selection.MoveRight Unit:=wdCharacter, Count:=1
' Selection.Delete Unit:=wdWord, Count:=1
' Selection.Delete Unit:=wdWord, Count:=1
'Loop
End Sub
Sub RemoveBackgCol()
'
' RemoveBackgCol Macro
' Macro recorded 18/01/04 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "\<span style*\>"
.Replacement.text = ""
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "\</span\>"
.Replacement.text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zCommentsAddOm()
'
' z Macro
' Macro recorded 23/01/04 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "omitted"
.Replacement.text = "<em>omitted</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "added"
.Replacement.text = "<em>added</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "[/com]"
.Replacement.text = "</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "[com]"
.Replacement.text = "<em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "missing"
.Replacement.text = "<em>missing</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zWw()
'
' zWw Macro
' Macro recorded 23/01/04 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Fi Bb An Ce La Ko Ca Vd Fr Lc Lb Vg Va Pa Vb Pb Ar Pz Ly Ba To Es Vc Ox Av Br We"
.Replacement.text = "Ww"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "Fi Bb An Ce La Ko Ca Vd Fr Lc Lb Vg Pc Va Pa Vb Pb Ar Pz Ly Ba To Es Vc Ox Av Br We"
.Replacement.text = "Ww+Pc"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub zElimSpaceBetweenSpans()
'
' zElimSpaceBetweenSpans Macro
' Macro recorded 23/01/04 by John
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "</span> <span style"
.Replacement.text = "</span><span style"
.Forward = True
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
End Sub
Sub zBoldSingleWordLemmata()
'
' zBoldSingleWordLemmata Macro
' Macro recorded 23/01/04 by John
'
Selection.HomeKey Unit:=wdStory
Do
Selection.Find.ClearFormatting
With Selection.Find
.text = "a\>*\]"
.Replacement.text = ""
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found = False Then Exit Do
Selection.Copy
Windows("process.doc").Activate
Selection.WholeStory
Selection.Paste
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "> "
.Replacement.text = ">"
.Forward = True
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " ]"
.Replacement.text = "]"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'test for multi-word
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = "]"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found = False Then blnFound = False
If Selection.Find.Found = True Then blnFound = True
If blnFound = False Then
'add bold format
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.TypeText text:=" <strong>"
Selection.Find.ClearFormatting
With Selection.Find
.text = "]"
.Replacement.text = "]"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText text:="</strong> "
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Copy
Selection.Delete Unit:=wdCharacter, Count:=1
Windows("source.doc").Activate
Selection.Paste
End If
If blnFound = True Then
Windows("source.doc").Activate
Selection.MoveRight Unit:=wdCharacter, Count:=1
End If
Loop
End Sub
Sub ZZZ()
'
' ZZZ Macro
' Macro recorded 26/01/04 by John
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "REPEATED"
.Replacement.text = "?"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.EscapeKey
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = " "
.Replacement.text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.text = "repeated added"
.Replacement.text = "<em>repeated</em>"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "indecipherable"
.Replacement.text = "illegible"
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub z()
'
' z Macro
' Macro recorded 3/03/04 by John
'
Selection.Find.ClearFormatting
With Selection.Find
.text = "$"
.Replacement.text = "348"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
Selection.TypeText text:="<a href=""1d1Col04.html#"
Selection.Paste
Selection.TypeText text:=""" target=""window2"">"
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText text:="</a>"
End Sub