Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

HOW TO CHECK IF THE ITEM FOUNDED, if (wordApp.Selection.Find.Execute) -doesn't work

$
0
0

I have to get the first match and if the item found, I need to get the next character.

This returns error: 

Error1Cannot convert method group 'Execute' to non-delegate type 'bool'. Did you intend to invoke the method?

if (wordApp.Selection.Find.Execute)                
{                    //was the Find successful?                    
wordApp.Selection.Collapse(wdCollapseEnd);                    
nextChar = wordApp.Selection.Range.Characters(1).Text;                   
 MsgBox(nextChar);                }


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>