hi
i have a word 2007 document , my word document have 4 text box control, i want to replace these text boxes with input strings in My apllication in c#,attention this ,i do not want to replace text type in word, i want to replace text box control of word document;
FindAndReplace(varWord, @"#Sabbat_School#", Properties.Settings.Default.SchoolName);
private void FindAndReplace(Word.Application wordApp,
object findText, object replaceText)
{
object matchCase = true;
object matchWholeWord = true;
object matchWildCards = false;
object matchSoundsLike = false;
object matchAllWordForms = false;
object forward = true;
object format = true;
object matchKashida = true;
object matchDiacritics = true;
object matchAlefHamza = true;
object matchControl = true;
object read_only = false;
object visible = true;
object replace = 2;
object wrap = 1;
wordApp.Selection.Find.Execute(ref findText, ref matchCase,
ref matchWholeWord, ref matchWildCards, ref matchSoundsLike,
ref matchAllWordForms, ref forward, ref wrap, ref format,
ref replaceText, ref replace, ref matchKashida,
ref matchDiacritics,
ref matchAlefHamza, ref matchControl);
}
this code is replace #Sabbat_School# to Properties.Settings.Default.SchoolName in word documents , but it replace text and does not work in text box control in word,
i want a code that work in text box control in word. please help me