Button click I am inserting the text.if I click the same button the text should insert new line.
click one = Text
click two = Text
like this I want. Please send me the code.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sameer ShaikPosted May 10, 2017, 3:41 AM
chetan AllipurPosted May 10, 2017, 5:30 AM
Paragraph oPara1 = null;
string TextToWrite = "Table" + " " + (num).ToString() + " " + tabletext.Text;
Object oMissing = System.Reflection.Missing.Value;
oPara1 = oWordDoc.Content.Paragraphs.Add(ref oMissing);
oPara1.Range.Text = TextToWrite;
var pText = oWordDoc.Paragraphs.Add();
pText.Format.SpaceAfter = 10f;
pText.Range.Font.Size = 12;
pText.Range.Font.Bold = 1;
pText.Range.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
pText.Range.Text = String.Format("Table" + " " + (num).ToString() + " " + tabletext.Text);
pText.Range.InsertParagraphAfter();
this.Hide();
Sameer ShaikPosted May 10, 2017, 5:14 AM
chetan AllipurPosted May 10, 2017, 4:45 AM