Document Clean Up

Here’s a general bunch of stuff to clean up a document inherited from someone. Sub docfix() ‘ ‘ docfix Macro ‘ ‘ Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ” ^t^t” .Replacement.Text = ” ” .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False […]

Delete Unused Styles

I don’t recall where I found this on the interwebs. It seems to work well. If anyone finds the original source, please comment and I’ll give the credit where credit is due! Sub DeleteUnusedStyles() Dim oStyle As Style On Error GoTo ErrorHandler Application.ScreenUpdating = False ‘ try to speed it up For Each oStyle In […]

Table Cleanup

This is a moderately generic macro to clean up tables. Sub tfixtest() ‘ ‘ tfixtest Macro ‘ On Error GoTo ErrorHandler Selection.Tables(1).Select Selection.Rows.HeightRule = wdRowHeightAuto Selection.Rows.AllowBreakAcrossPages = False ‘ Selection.SelectCell Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft With Selection.ParagraphFormat ‘ .RightIndent = InchesToPoints(0) ‘ .LeftIndent = InchesToPoints(0) .SpaceBefore = 1 .SpaceBeforeAuto = False .SpaceAfter = 1 .SpaceAfterAuto = False […]