File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Fields/Get-field-code/.NET/Get-field-code Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- using Syncfusion . DocIO ;
1+ using Syncfusion . DocIO ;
22using Syncfusion . DocIO . DLS ;
33using System ;
44using System . IO ;
@@ -15,11 +15,11 @@ static void Main(string[] args)
1515 // Load the template document.
1616 using ( WordDocument document = new WordDocument ( fileStreamPath , FormatType . Docx ) )
1717 {
18- // Access the merge field in the first paragraph of the first section.
19- WMergeField mergeField = document . Sections [ 0 ] . Paragraphs [ 0 ] . ChildEntities [ 2 ] as WMergeField ;
18+ // Access the field in the first paragraph of the first section.
19+ WField field = document . Sections [ 0 ] . Paragraphs [ 0 ] . ChildEntities [ 2 ] as WField ;
2020
2121 // Get and print the field code of the merge field.
22- string fieldCode = mergeField . FieldCode ;
22+ string fieldCode = field . FieldCode ;
2323 Console . WriteLine ( fieldCode ) ;
2424 }
2525 }
You can’t perform that action at this time.
0 commit comments