7
Answers

VSTO word error

I am getting issue like this "Item with specified name does not exist."
my code
 
Selection wordsec = Globals.ThisAddIn.Application.Selection;
 
if (sTextSz == "10")
{
object Text10 = "TableText10";
wordsec.set_Style(ref Text10);
}
else if (sTextSz == "9")
{
wordsec.set_Style("TableText9");
}
else
{
wordsec.set_Style("TableText8");
}
 
Please anyone send me the code in VSTO word 
Answers (7)