![]() |
#8
|
||||
|
||||
![]()
This macro will help you standardise your document's hanging indents AND makes use of styles. It will greatly reduce inconsistency in your styling of the document because it is resetting the paragraph formats and removes local paragraph overrides.
Code:
Sub AllStylesSetHanging() Dim aStyle As Style For Each aStyle In ActiveDocument.Styles If aStyle.Type = wdStyleTypeParagraph Then If aStyle.ParagraphFormat.FirstLineIndent < 0 Then aStyle.ParagraphFormat.FirstLineIndent = -CentimetersToPoints(1) If aStyle.ParagraphFormat.LeftIndent < CentimetersToPoints(1) Then aStyle.ParagraphFormat.LeftIndent = CentimetersToPoints(1) End If End If End If Next aStyle ActiveDocument.Range.ParagraphFormat.Reset End Sub If you see other non-hanging paragraphs change as a result of this macro, you should apply the right styles to those paragraphs.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Updating hyperlinks in a document where clauses are deleted and auto numbering of paragraphs change | Angela Jackson | Word | 2 | 03-21-2018 02:42 AM |
![]() |
jplat | Word VBA | 1 | 09-10-2017 09:13 PM |
Continue Numbering Paragraphs | PJinNH | Word | 5 | 03-15-2017 04:10 PM |
Macro for hanging indent and single space | pbishop | Word | 2 | 09-11-2016 06:49 PM |
![]() |
muiy | Word | 4 | 08-01-2016 08:18 PM |