Paragraph.IsStyleSeparator property (Word)
True if a paragraph contains a special hidden paragraph mark that allows Microsoft Word to appear to join paragraphs of different paragraph styles. Read-only Boolean.
Syntax
expression. IsStyleSeparator
expression An expression that returns a 'Paragraph' object.
Example
This example formats all paragraphs in which there is a style separator with the built-in "Normal" style.
Sub StyleSep()
Dim pghDoc As Paragraph
For Each pghDoc In ActiveDocument.Paragraphs
If pghDoc.IsStyleSeparator = True Then
pghDoc.Range.Select
Selection.Style = "Normal"
End If
Next pghDoc
End Sub
This example adds a paragraph after each style separator and then deletes the style separator.
Sub RemoveStyleSeparator()
Dim pghDoc As Paragraph
Dim styName As String
'Loop through all paragraphs in document to check if it is a style
'separator. If it is, delete it and enter a regular paragraph
For Each pghDoc In ActiveDocument.Paragraphs
If pghDoc.IsStyleSeparator = True Then
pghDoc.Range.Select
With Selection
.Collapse (wdCollapseEnd)
.TypeParagraph
.MoveLeft (1)
.TypeBackspace
End With
End If
Next pghDoc
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for