diff --git a/Microsoft Word related/Word Macros/MakeDoubleParagraphs.bas b/Microsoft Word related/Word Macros/MakeDoubleParagraphs.bas new file mode 100644 index 0000000..4af2957 --- /dev/null +++ b/Microsoft Word related/Word Macros/MakeDoubleParagraphs.bas @@ -0,0 +1,26 @@ +Attribute VB_Name = "NewMacros" +Sub MakeDoubleParagraphs() +Attribute MakeDoubleParagraphs.VB_Description = "Makes all single paragraph spaces into double spaces." +Attribute MakeDoubleParagraphs.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.MakeDoubleParagraphs" +' +' MakeDoubleParagraphs Macro +' Makes all single paragraph spaces into double spaces. +' + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find + .Text = "^p" + .Replacement.Text = "^p^p" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + Selection.MoveLeft Unit:=wdCharacter, Count:=1 + Selection.MoveRight Unit:=wdCharacter, Count:=1 +End Sub diff --git a/Microsoft Word related/Word Macros/NewCleanDialogMacros.bas b/Microsoft Word related/Word Macros/NewCleanDialogMacros.bas new file mode 100644 index 0000000..f5e9249 --- /dev/null +++ b/Microsoft Word related/Word Macros/NewCleanDialogMacros.bas @@ -0,0 +1,348 @@ +Attribute VB_Name = "NewMacros" +Sub CleanDialog() + ' +' Cleandialog Macro +' A macro that will replace any lower case quoted text with capital letters. +' + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find + .Text = """a" + .Replacement.Text = """A" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """b" + .Replacement.Text = """B" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """c" + .Replacement.Text = """C" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """d" + .Replacement.Text = """D" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """e" + .Replacement.Text = """E" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """f" + .Replacement.Text = """F" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """g" + .Replacement.Text = """G" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """h" + .Replacement.Text = """H" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """i" + .Replacement.Text = """I" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """j" + .Replacement.Text = """J" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """k" + .Replacement.Text = """K" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """l" + .Replacement.Text = """L" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """m" + .Replacement.Text = """M" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """n" + .Replacement.Text = """N" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """o" + .Replacement.Text = """O" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + 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 + With Selection.Find + .Text = """q" + .Replacement.Text = """Q" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """r" + .Replacement.Text = """R" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """s" + .Replacement.Text = """S" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """t" + .Replacement.Text = """T" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """u" + .Replacement.Text = """U" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """v" + .Replacement.Text = """V" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """w" + .Replacement.Text = """W" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """x" + .Replacement.Text = """X" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """y" + .Replacement.Text = """Y" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """z" + .Replacement.Text = """Z" + .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 + diff --git a/Microsoft Word related/Word Macros/OlderCleanDialog.bas b/Microsoft Word related/Word Macros/OlderCleanDialog.bas new file mode 100644 index 0000000..f5e9249 --- /dev/null +++ b/Microsoft Word related/Word Macros/OlderCleanDialog.bas @@ -0,0 +1,348 @@ +Attribute VB_Name = "NewMacros" +Sub CleanDialog() + ' +' Cleandialog Macro +' A macro that will replace any lower case quoted text with capital letters. +' + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find + .Text = """a" + .Replacement.Text = """A" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """b" + .Replacement.Text = """B" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """c" + .Replacement.Text = """C" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """d" + .Replacement.Text = """D" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """e" + .Replacement.Text = """E" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """f" + .Replacement.Text = """F" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """g" + .Replacement.Text = """G" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """h" + .Replacement.Text = """H" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """i" + .Replacement.Text = """I" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """j" + .Replacement.Text = """J" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """k" + .Replacement.Text = """K" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """l" + .Replacement.Text = """L" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """m" + .Replacement.Text = """M" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """n" + .Replacement.Text = """N" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """o" + .Replacement.Text = """O" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + 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 + With Selection.Find + .Text = """q" + .Replacement.Text = """Q" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """r" + .Replacement.Text = """R" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """s" + .Replacement.Text = """S" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """t" + .Replacement.Text = """T" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """u" + .Replacement.Text = """U" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """v" + .Replacement.Text = """V" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """w" + .Replacement.Text = """W" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """x" + .Replacement.Text = """X" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """y" + .Replacement.Text = """Y" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + With Selection.Find + .Text = """z" + .Replacement.Text = """Z" + .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 + diff --git a/Microsoft Word related/Word Macros/QFix.bas b/Microsoft Word related/Word Macros/QFix.bas new file mode 100644 index 0000000..5d54d87 --- /dev/null +++ b/Microsoft Word related/Word Macros/QFix.bas @@ -0,0 +1,268 @@ +Attribute VB_Name = "NewMacros" +Sub QFix() + +' + +' Qfix Macro + +' + +' + +'Go to start of document + + Selection.HomeKey Unit:=wdStory + +' + +'Clear formatting + + Selection.Find.ClearFormatting + + Selection.Find.Replacement.ClearFormatting + +' + +' Replace quotation marks + + 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 + +' + +' Replace apostrophes + + 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 + +' + +' Replace hanging space at end of paragraph + + Selection.Find.ClearFormatting + + Selection.Find.Replacement.ClearFormatting + + With Selection.Find + + .Text = "^w^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 + +' + +' Replace leading space at start of paragraph + + Selection.Find.ClearFormatting + + Selection.Find.Replacement.ClearFormatting + + With Selection.Find + + .Text = "^p^w" + + .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 + +' + +' Replace double spaces + + 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 + +' + +' Replace double hyphen with em dash + + 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 + + +' Replace hyphen with en dash + + 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 + +' + +'Clear formatting + + Selection.Find.ClearFormatting + + Selection.Find.Replacement.ClearFormatting + + +End Sub