CodeProject - Spell Check in .NET without adding a reference ahead of time - version agnostic!
“Very often, when developing software, we have to include a spelling and grammar check function, and don't want to shell out the cash for a proprietary solution. We search the web and find ways to incorporate the MS Word interop capabilities - it always starts with, create a solution, add a reference.
Then, we build it and run it, and it works great. Then, we run it on someone else's computer who either doesn't have MS Word or has a different version, and we have all kinds of problems - assemblies not found in the GAC, etc. Why can't we add the reference at runtime so we can use any version of Word?
Using the
System.Reflectionnamespace, we can!…”
There are a number of times, now and in the future, where I need to dynamically (i.e. at runtime) invoke a COM object via its ProgID and so this caught my eye. I know you all know this, but I am still trying to delete/re-purpose my VB6 mental pathways and when I saw this code snip in the project I knew that I wanted to capture it for future reference.
Yes, the .Net VisualBasic namespace has a CreateObject (and GetObject, etc) but as one of my personal goals is to start using C# in my personal projects…
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...