C# и Word. Поиск в надписях
Object unit = Word.WdUnits.wdStory;
Object extend = Word.WdMovementType.wdMove;
AppWord.Selection.HomeKey(ref unit,ref extend);
Word.Find fnd = AppWord.Selection.Find;
fnd.ClearFormatting();
fnd.Text = "Метка";
fnd.Replacement.ClearFormatting();
fnd.Replacement.Text = "Некое слово";
Object findText = Type.Missing;
Object matchCase = Type.Missing;
Object matchWholeWord = Type.Missing;
Object matchWildcards = Type.Missing;
Object matchSoundsLike = Type.Missing;
Object matchAllWordForms = Type.Missing;
Object forward = Type.Missing;
Object wrap = Word.WdFindWrap.wdFindContinue;
Object format = Type.Missing;
Object replaceWith = Type.Missing;
Object replace = Word.WdReplace.wdReplaceAll;
Object matchKashida = Type.Missing;
Object matchDiacritics = Type.Missing;
Object matchAlefHamza = Type.Missing;
Object matchControl = Type.Missing;
if (fnd.Execute(ref findText, ref matchCase,
ref matchWholeWord, ref matchWildcards, ref matchSoundsLike,
ref matchAllWordForms, ref forward, ref wrap, ref format,
ref replaceWith, ref replace, ref matchKashida,
ref matchDiacritics, ref matchAlefHamza, ref matchControl))
MessageBox.Show("Yes!");
else
MessageBox.Show("No");
Как можно это сделать? И как вообще искать по всему документу, включая надписи, таблицы и т.д?
Есть такая весч IFilter - попробуй использовать её, должно работать.