Skip to content

Commit ff7a83b

Browse files
Removed the unwanted sample
1 parent 47215e0 commit ff7a83b

File tree

9 files changed

+3
-108
lines changed

9 files changed

+3
-108
lines changed

Bookmarks/Maintain-source-list-format-after-replace/.NET/Maintain-source-list-format-after-replace/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ static void Main(string[] args)
1818
using (WordDocument sourceDocument = new WordDocument(sourceStream, FormatType.Docx))
1919
{
2020
//Replace text "Text one" in the destination document with content from the bookmark "bkmk1" in the source document.
21-
DocxReplaceTextWithDocPart(destinationDocument, sourceDocument, "Text one", "bkmk1");
21+
ReplaceTextAndMaintainListFormat(destinationDocument, sourceDocument, "Text one", "bkmk1");
2222
//Replace text "Text two" in the destination document with content from the bookmark "bkmk2" in the source document.
23-
DocxReplaceTextWithDocPart(destinationDocument, sourceDocument, "Text two", "bkmk2");
23+
ReplaceTextAndMaintainListFormat(destinationDocument, sourceDocument, "Text two", "bkmk2");
2424
//Save the modified destination document to the output stream.
2525
using (FileStream output = new FileStream(Path.GetFullPath("Output/Output.docx"), FileMode.Create, FileAccess.Write))
2626
{
@@ -35,7 +35,7 @@ static void Main(string[] args)
3535
/// <summary>
3636
/// Replaces specific text in a Word document with bookmarked content from another document, maintaining formatting.
3737
/// </summary>
38-
private static void DocxReplaceTextWithDocPart(WordDocument destinationDocument, WordDocument sourceDocument, string tokenToFind, string textBookmark)
38+
private static void ReplaceTextAndMaintainListFormat(WordDocument destinationDocument, WordDocument sourceDocument, string tokenToFind, string textBookmark)
3939
{
4040
string bookmarkRef = textBookmark + "_bm";
4141
// Find the text in the destination document where the bookmark start needs to be inserted.

Word-document/Merge–multiple-Word-files-in-same-page/.NET/Merge–multiple-Word-files-in-same-page.sln

Lines changed: 0 additions & 25 deletions
This file was deleted.

Word-document/Merge–multiple-Word-files-in-same-page/.NET/Merge–multiple-Word-files-in-same-page/Merge–multiple-Word-files-in-same-page.csproj

Lines changed: 0 additions & 33 deletions
This file was deleted.

Word-document/Merge–multiple-Word-files-in-same-page/.NET/Merge–multiple-Word-files-in-same-page/Output/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

Word-document/Merge–multiple-Word-files-in-same-page/.NET/Merge–multiple-Word-files-in-same-page/Program.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)