diff --git a/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text.sln b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text.sln new file mode 100644 index 00000000..2eaa4661 --- /dev/null +++ b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36930.0 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Set-Proofing-Language-to-Text", "Set-Proofing-Language-to-Text\Set-Proofing-Language-to-Text.csproj", "{7C5CEB8B-D847-4077-B7C2-AF16823EBB0F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7C5CEB8B-D847-4077-B7C2-AF16823EBB0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C5CEB8B-D847-4077-B7C2-AF16823EBB0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C5CEB8B-D847-4077-B7C2-AF16823EBB0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C5CEB8B-D847-4077-B7C2-AF16823EBB0F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A7CE16EB-FBE7-4F9D-9165-A05AB9562CF0} + EndGlobalSection +EndGlobal diff --git a/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Output/.gitkeep b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Output/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Output/Result.docx b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Output/Result.docx new file mode 100644 index 00000000..3296457b Binary files /dev/null and b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Output/Result.docx differ diff --git a/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Program.cs b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Program.cs new file mode 100644 index 00000000..cd4d0d3c --- /dev/null +++ b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Program.cs @@ -0,0 +1,32 @@ +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.Office; +using System.IO; + +namespace Set_Proofing_Language_to_Text +{ + class Program + { + static void Main(string[] args) + { + //Creates a new Word document. + using (WordDocument document = new WordDocument()) + { + //Add new section to the document. + IWSection section = document.AddSection(); + //Add new paragraph to the section. + IWParagraph paragraph = section.AddParagraph(); + //Add new text to the paragraph. + IWTextRange text = paragraph.AppendText("Adventure Works Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company"); + //Set language identifier. + text.CharacterFormat.LocaleIdASCII = (short)LocaleIDs.pt_PT; + //Creates file stream. + using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite)) + { + //Saves the Word document to file stream. + document.Save(outputFileStream, FormatType.Docx); + } + } + } + } +} diff --git a/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Set-Proofing-Language-to-Text.csproj b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Set-Proofing-Language-to-Text.csproj new file mode 100644 index 00000000..a124bcdf --- /dev/null +++ b/Paragraphs/Set-Proofing-Language-to-Text/.NET/Set-Proofing-Language-to-Text/Set-Proofing-Language-to-Text.csproj @@ -0,0 +1,19 @@ + + + + Exe + net8.0 + Set-Proofing-Language-to-Text + + + + + + + + + Always + + + +