chetan Allipur

chetan Allipur

  • NA
  • 541
  • 169.1k

I am using VSTO word add ins

May 11 2017 1:05 AM
I want to insert the text in the center in my code. I cant able to do that. please help me here is my code
 
 
Document oWordDoc = Globals.ThisAddIn.Application.ActiveDocument;
Paragraph oPara1 = null;
var pText = oWordDoc.Paragraphs.Add();
pText.Format.SpaceAfter = 10f;
pText.Range.Font.Size = 12;
pText.Range.Font.Name = "TimesNewRoman";
pText.Range.Font.Bold = 1;
pText.Range.Text = String.Format("Table" + " " + (num).ToString() + " " + tabletext.Text);
pText.Range.InsertParagraphAfter();
this.Hide();

Answers (4)