Click here to Skip to main content
15,904,288 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting issue like this "Item with specified name does not exist."
This is the line of code that occurring error.

C#
wordsec.set_Style(ref Text10); 
wordsec.set_Style("TableText9");
wordsec.set_Style("TableText8");


Here is code,

What I have tried:

C#
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");
}


How can I solve this VSTO word error ? Please help me...
Posted
Comments
Richard MacCutchan 28-Jun-17 2:05am    
Which is the object that does not exist?
Member 12955507 28-Jun-17 2:10am    
TableText9 this one. We have to do using LinkedStyle. But I dont know how to do

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900