Hi PRA,
You can't correct all the statement. Only you can replace Д and Б in the sentences. Can't add the .(dot) after the number of each question.
For this you need to write custom code.
Refer below code to replace the Д and Б.
Namespace
C#
using Word = Microsoft.Office.Interop.Word;
VB.Net
Imports Word = Microsoft.Office.Interop.Word
Code
C#
private void button1_Click(object sender, EventArgs e)
{
object fileName = @"D:\Test.docx";
Word.Application word = new Word.Application();
Word.Document doc = new Word.Document();
object missing = System.Type.Missing;
try
{
doc = word.Documents.Open(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
doc.Activate();
foreach (Word.Range docRange in doc.StoryRanges)
{
docRange.Text = docRange.Text.Replace("$Д)", "$D)").Replace("$Б)", "$B)");
}
doc.Save();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
((Word._Document)doc).Close();
((Word._Application)word).Quit();
}
}
VB.Net
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim fileName As Object = "D:\Test.docx"
Dim word As Word.Application = New Word.Application()
Dim doc As Word.Document = New Word.Document()
Dim missing As Object = System.Type.Missing
Try
doc = word.Documents.Open(fileName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
doc.Activate()
For Each docRange As Word.Range In doc.StoryRanges
docRange.Text = docRange.Text.Replace("$Д)", "$D)").Replace("$Б)", "$B)")
Next
doc.Save()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
(CType(doc, Word._Document)).Close()
(CType(word, Word._Application)).Quit()
End Try
End Sub