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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sameer ShaikRank #1,826 · 812 reputationPosted May 9, 2017, 11:41 PM EDT
chetan AllipurRank #2,527 · 554 reputationPosted May 10, 2017, 12:45 AM EDT
Sameer ShaikRank #1,826 · 812 reputationPosted May 10, 2017, 1:14 AM EDT
chetan AllipurRank #2,527 · 554 reputationPosted May 10, 2017, 1:30 AM EDT
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();