|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered
I recently migrated from Office 2011 for Mac to Office 365 for Mac, which I have been loathe to do out of fear that my Word macros wouldn't work correctly. For the most part, they've been working fine, but there are a couple of things I'm hoping someone can help with:
1) As part of a larger macro, I have code that is supposed to remove lines with paragraph spacing of exactly 6. (The purpose/effect is to remove spaces between certain tables, such that those tables are joined to become rows of a single table.) The following code worked fine in Word 2011, but is not working in Word 365: 'Start from The Top Selection.HomeKey Unit:=wdStory 'Find the first search to start the loop Do With Selection.Find .ClearFormatting .ParagraphFormat.LineSpacingRule = wdLineSpaceExactly .ParagraphFormat.LineSpacing = 6 .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute 'If we found the result then loop started If Selection.Find.Found Then Selection.Delete Unit:=wdCharacter, Count:=1 Else Exit Do End If Loop Is there a reason this has stopped working? 2) Is there macro code that will find all occurrences of a certain string (say "ParaLev1"), delete that string, and convert the paragraph that contained that string into an outline numbered paragraph? The idea would be to convert paragraphs containing "ParaLev1" to outline level 1, and paragraphs containing "ParaLev2" to outline level 2. And how would I set the formatting of the outline levels in the document -- for example, so that all level 1 paragraphs are first line indented .5" and numbered (followed by a period) and all level 2 paragraphs are first line indented 1" and letter numbered (followed by a period)? Many thanks in advance for any assistance. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remove consecutive empty paragraphs within existing macro | kevinbradley57 | Word VBA | 5 | 10-11-2017 05:04 PM |
Cannot remove a random line only appears when I convert to PDF | drjarmin | Word | 11 | 01-24-2017 08:59 PM |
Macro to Expand Outline Heading in Outline View? | Clueless in Seattle | Word VBA | 1 | 05-04-2015 05:44 PM |
Macro to toggle outline level | Jennifer Murphy | Word VBA | 3 | 01-22-2014 11:22 PM |
Need help on Macro 03- Find text - if text is blank then remove line | simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |