Test Defence.doc (44.5 KB)
Hi everyone, I am trying to create a macro to change paragraph/line spacing, justification etc. (as per the coding below). I have attached a document to explain what I need the macro to do. Court compliancy has recently changed and we therefore need to manually update the VF auto generated templates (these are under review). Is there a way I can reformat the document:
1. takes any underlining off;
2. deletes any two spaces to one between words;
3. adds a space after the colon for the claim number;
4. removes the hyphen after the colon on B E T W E E N;
5. converts para spacing to 0pt before and 12pt after;
6. converts line spacing to 1.5 spacing;
7. deletes any extra manual returns.
At the moment I am highlighting all of the numbered paragraphs because otherwise it deletes the tramlines. Also because I’m asking it to justify it also justifies any headings within the numbered paragraphs but I want them to remain centred. I’m just wondering if my coding could be built upon at all?
Sub DPU_VFCourt() With Selection.Find .ClearFormatting .Replacement.ClearFormatting Delete extra spaces .Text = “[^13]{2,}” .Replacement.Text = “^p” Convert paragraph spacing .Replacement.ParagraphFormat.SpaceBefore = 0 .Replacement.ParagraphFormat.SpaceAfter = 12 Convert line spacing .Replacement.ParagraphFormat.LineSpacingRule = wdLineSpace1pt5 Justify text .Replacement.ParagraphFormat.Alignment = wdAlignParagraphJustify .Forward = True .MatchWildcards = True .Wrap = wdFindStop .Execute Replace:=wdReplaceAll End With End Sub
Thanks
Shelley