FixQuote macro for MS Word

Bar llan Responsa CD has a funny way to show bibliographical quotes – it puts it surrounded by plus sign before the quote. This bothered my wife so I wrote her a Word macro to fix it. All she has to do to use it is to move the selection to the end of the quote, and run the macro. Here it is in case it somehow gets deleted, as it did today:

Sub FixQuote()

Dim quoteRange As Range
Dim quote As String
Set quoteRange = Selection.Range
quoteRange.Find.Execute FindText:="+*+ ", Forward:=False, MatchWildcards:=True
quote = quoteRange.Text
quoteRange.Text = ""
quote = " (" + Mid$(quote, 2, Len(quote) - 3) + ")"
Selection.InsertAfter quote
Selection.Collapse wdCollapseEnd

End Sub


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: