File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed
Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ Microsoft Visual Studio Solution File, Format Version 12.00
3+ # Visual Studio Version 17
4+ VisualStudioVersion = 17.10.34928.147
5+ MinimumVisualStudioVersion = 10.0.40219.1
6+ Project ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ) = "Extract-comments" , "Extract-comments\Extract-comments.csproj" , "{79D8C804-0EF9-4BF8-8390-639A737A0D42}"
7+ EndProject
8+ Global
9+ GlobalSection (SolutionConfigurationPlatforms ) = preSolution
10+ Debug| Any CPU = Debug| Any CPU
11+ Release| Any CPU = Release| Any CPU
12+ EndGlobalSection
13+ GlobalSection (ProjectConfigurationPlatforms ) = postSolution
14+ {79D8C804-0EF9-4BF8-8390-639A737A0D42} .Debug| Any CPU .ActiveCfg = Debug| Any CPU
15+ {79D8C804-0EF9-4BF8-8390-639A737A0D42} .Debug| Any CPU .Build .0 = Debug| Any CPU
16+ {79D8C804-0EF9-4BF8-8390-639A737A0D42} .Release| Any CPU .ActiveCfg = Release| Any CPU
17+ {79D8C804-0EF9-4BF8-8390-639A737A0D42} .Release| Any CPU .Build .0 = Release| Any CPU
18+ EndGlobalSection
19+ GlobalSection (SolutionProperties ) = preSolution
20+ HideSolutionNode = FALSE
21+ EndGlobalSection
22+ GlobalSection (ExtensibilityGlobals ) = postSolution
23+ SolutionGuid = {08816482-E634-492E-8D98-11456B2079EC}
24+ EndGlobalSection
25+ EndGlobal
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <OutputType >Exe</OutputType >
5+ <TargetFramework >net8.0</TargetFramework >
6+ <RootNamespace >Extract_comments</RootNamespace >
7+ <ImplicitUsings >enable</ImplicitUsings >
8+ <Nullable >enable</Nullable >
9+ </PropertyGroup >
10+
11+ <ItemGroup >
12+ <PackageReference Include =" Syncfusion.DocIO.Net.Core" Version =" *" />
13+ </ItemGroup >
14+
15+ </Project >
Original file line number Diff line number Diff line change 1+ using Syncfusion . DocIO . DLS ;
2+ using Syncfusion . DocIO ;
3+
4+ namespace Extract_comments
5+ {
6+ internal class Program
7+ {
8+ static void Main ( string [ ] args )
9+ {
10+ //Open an existing document
11+ using ( FileStream inputStream = new FileStream ( @"../../../Data/Template.docx" , FileMode . Open , FileAccess . Read ) )
12+ {
13+ using ( WordDocument document = new WordDocument ( inputStream , FormatType . Docx ) )
14+ {
15+ //Iterate through the comments in the Word document
16+ foreach ( WComment comment in document . Comments )
17+ {
18+ //Traverse each paragraph from the comment body items
19+ foreach ( WParagraph paragraph in comment . TextBody . Paragraphs )
20+ Console . WriteLine ( paragraph . Text ) ;
21+ }
22+ }
23+ }
24+ }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments