Thread: [Solved] VBA IF Statement Help
View Single Post
 
Old 03-20-2024, 01:18 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Shelley,


Ah, yes. I see what you mean. Yes, changing the main procedure to something like this will work:

Code:
Sub MainProcedure()
Dim oRng As Range
  Application.ScreenUpdating = False
  'Do things
  'Do things
  'Call the CompoundCR procedure for the main text and footnotes (if exists)
  For Each oRng In ActiveDocument.StoryRanges
    Select Case oRng.StoryType
      Case 1, 2: CompoundCRs oRng
    End Select
  Next oRng
  'Do things or call other procedures
  Application.ScreenUpdating = True
  Selection.HomeKey Unit:=wdStory
  MsgBox "Complete"
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote