User:Phlox/word macros

These are Microsoft word macros useful for genealogy. See comments for usage. Sub WPLink ' 'What it does: Converts Wikipedia article links for use on Genealogy wikia. 'How to use it: Converts one link at a time. Assign to a Keyboard key, eg Alt-F1. '   Temporarily global search replace "    Selection.Find.ClearFormatting    With Selection.Find        .Text = ""        .Replacement.Text = "{{wp"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = False        .MatchWholeWord = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute    Selection.Delete Unit:=wdCharacter, Count:=1    Selection.TypeText Text:="}}" End Sub