Skip to content

Commit b34882b

Browse files
Merge pull request #543 from Suriya-Balamurugan/main
Documentation(1007016): Modified the folder location of the existing samples
2 parents 67d5b2f + a95642b commit b34882b

21 files changed

Lines changed: 83 additions & 7 deletions

File tree

Word-file-formats/Create-Docx-format-Word-document/.NET/Create-Docx-format-Word-document.sln renamed to Paragraphs/Ole-image-as-normal-image/.NET/Ole-image-as-normal-image.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.30804.86
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create-Docx-format-Word-document", "Create-Docx-format-Word-document/Create-Docx-format-Word-document.csproj", "{371FD598-B395-4930-AED0-3839092F6FF5}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ole-image-as-normal-image", "Ole-image-as-normal-image/Ole-image-as-normal-image.csproj", "{371FD598-B395-4930-AED0-3839092F6FF5}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<RootNamespace>Ole_image_as_normal_image</RootNamespace>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<None Update="Data\Template.docx">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
<None Update="Output\.gitkeep">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
</ItemGroup>
21+
22+
</Project>

Word-file-formats/Create-Docx-format-Word-document/.NET/Create-Docx-format-Word-document/Output/.gitkeep renamed to Paragraphs/Ole-image-as-normal-image/.NET/Ole-image-as-normal-image/Output/.gitkeep

File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Syncfusion.DocIO;
2+
using Syncfusion.DocIO.DLS;
3+
using System.IO;
4+
5+
namespace Ole_image_as_normal_image
6+
{
7+
class Program
8+
{
9+
static void Main(string[] args)
10+
{
11+
//Creates a new instance of WordDocument (Empty Word Document).
12+
using (WordDocument document = new WordDocument())
13+
{
14+
//Loads or opens an existing Word document from stream.
15+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
16+
{
17+
//Sets flag to preserve embedded Ole image as normal image while opening document.
18+
document.Settings.PreserveOleImageAsImage = true;
19+
//Loads or opens an existing Word document through Open method of WordDocument class.
20+
document.Open(fileStreamPath, FormatType.Automatic);
21+
//Creates file stream.
22+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
23+
{
24+
//Saves the Word document to file stream.
25+
document.Save(outputFileStream, FormatType.Docx);
26+
}
27+
}
28+
}
29+
}
30+
}
31+
}

WordML-conversion/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML.slnx renamed to Word-file-formats/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML.slnx

File renamed without changes.

WordML-conversion/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Convert-Word-to-WordML.csproj renamed to Word-file-formats/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Convert-Word-to-WordML.csproj

File renamed without changes.

WordML-conversion/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Data/Template.docx renamed to Word-file-formats/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Data/Template.docx

File renamed without changes.

WordML-conversion/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Output/.gitkeep renamed to Word-file-formats/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Output/.gitkeep

File renamed without changes.

WordML-conversion/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Program.cs renamed to Word-file-formats/Convert-Word-to-WordML/.NET/Convert-Word-to-WordML/Program.cs

File renamed without changes.

0 commit comments

Comments
 (0)