Hi, atm i have a peice of code that will open microsoft word, and then copy text that it inside two speech marks. But instead of copying the text from the speech marks, i want to change the code to copy text from text boxes and put it into Microsoft Word instead.
Cheers
Matt
Code:
private void BtnAutomateWord_Click(object sender, EventArgs e)
{
Word.Application objWord = new Word.Application();
objWord.Visible = true;
Word.Document objDoc;
object objMissing = System.Reflection.Missing.Value;
objDoc = objWord.Documents.Add (ref objMissing, ref objMissing, ref objMissing, ref objMissing);
objWord.Selection.TypeText ("THIS WILL APEEAR IN WORD");
objWord = null;
}
Matt
Comment