7
Reply

VSTO word error

chetan Allipur

chetan Allipur

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