Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2022, 06:28 PM
venganewt venganewt is offline Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered Mac OS X Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered Office for Mac 2011
Novice
Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered
 
Join Date: Oct 2014
Posts: 13
venganewt is on a distinguished road
Default 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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered Remove consecutive empty paragraphs within existing macro kevinbradley57 Word VBA 5 10-11-2017 05:04 PM
Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered 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 Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered Macro to toggle outline level Jennifer Murphy Word VBA 3 01-22-2014 11:22 PM
Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft