chetan Allipur

chetan Allipur

  • NA
  • 541
  • 158.2k

VSTO word error

Jun 27 2017 8:19 AM
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)