Skip to content

Commit c76a6f1

Browse files
docio playground changes for github examples
1 parent f9057d1 commit c76a6f1

File tree

218 files changed

+920
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+920
-114
lines changed

Bookmarks/Add-bookmark-in-Word-document/.NET/Add-bookmark-in-Word-document/Add-bookmark-in-Word-document.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Output\.gitkeep">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
</ItemGroup>
18+
1319
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Bookmarks/Add-bookmark-in-Word-document/.NET/Add-bookmark-in-Word-document/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static void Main(string[] args)
2828
//Adds a text after the bookmark end.
2929
paragraph.AppendText(" Using Northwind, you can become familiar with how a relational database is structured and how the database objects work together to help you enter, store, manipulate, and print your data.");
3030
//Creates file stream.
31-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
31+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.docx"), FileMode.Create, FileAccess.ReadWrite))
3232
{
3333
//Saves the Word document to file stream.
3434
document.Save(outputFileStream, FormatType.Docx);

Bookmarks/Delete-bookmark-content/.NET/Delete-bookmark-content/Delete-bookmark-content.csproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -10,4 +10,17 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<Folder Include="Data\" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<None Update="Data\Template.docx">
19+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
20+
</None>
21+
<None Update="Output\.gitkeep">
22+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
23+
</None>
24+
</ItemGroup>
25+
1326
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Bookmarks/Delete-bookmark-content/.NET/Delete-bookmark-content/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Program
99
{
1010
static void Main(string[] args)
1111
{
12-
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
12+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
1313
{
1414
//Opens an existing Word document.
1515
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Automatic))
@@ -21,7 +21,7 @@ static void Main(string[] args)
2121
//Deletes bookmark content without deleting the format in the target document.
2222
bookmarkNavigator.DeleteBookmarkContent(false);
2323
//Creates file stream.
24-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
24+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.docx"), FileMode.Create, FileAccess.ReadWrite))
2525
{
2626
//Saves the Word document to file stream.
2727
document.Save(outputFileStream, FormatType.Docx);

Bookmarks/Get-an-instance-of-bookmark/.NET/Get-an-instance-of-bookmark/Get-an-instance-of-bookmark.csproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -10,4 +10,17 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<Folder Include="Data\" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<None Update="Data\Template.docx">
19+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
20+
</None>
21+
<None Update="Output\.gitkeep">
22+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
23+
</None>
24+
</ItemGroup>
25+
1326
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


0 commit comments

Comments
 (0)