Skip to content

Commit 71477c9

Browse files
committed
Modified the changes
1 parent 6875448 commit 71477c9

File tree

1 file changed

+3
-0
lines changed
  • Word-document/Insert-PageBreak-Before-Heading-Paragraphs/.NET/Insert-PageBreak-Before-Heading-Paragraphs

1 file changed

+3
-0
lines changed

Word-document/Insert-PageBreak-Before-Heading-Paragraphs/.NET/Insert-PageBreak-Before-Heading-Paragraphs/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ public static void Main(string[] args)
1212
List<Entity> entities = document.FindAllItemsByProperty(EntityType.Paragraph, "StyleName", "Heading 1");
1313

1414
if (entities == null)
15+
{
1516
Console.WriteLine("No paragraphs with the style 'Heading 1' found.");
17+
return;
18+
}
1619
foreach (Entity entity in entities)
1720
{
1821
// Check if the entity is a paragraph

0 commit comments

Comments
 (0)