My goal is to write a COM add-in for word that records the words I spell wrong when I use Word to check my spelling.
I thought the way to do this would be to override the checkspelling method in Microsoft.Offic e.Interop.Word. DocumentClass . When I try to override that one function I get an error:
COM Interop registration failed. Type library exporter encountered an error while processing 'OfficeSpelling Addin'. Error: Type library exporter can not load type OfficeSpellingA ddin.Connect (error: System.TypeLoad Exception: Types extending from COM objects should override all methods of an interface implemented by the base COM class.).
Therefore I took all of the methods and properties (need both to get the error above to go away) and made overrides for them (If you want this code I can send it to you – it was a lot of work). But a few properties have byref and I get this error:
D:\Visual Studio Projects\Office SpellingAddin\C onnect.vb(550): 'Public Overrides Property ClickAndTypePar agraphStyle() As Object' cannot override 'Public Overridable Property ClickAndTypePar agraphStyle() As Object' because they differ by a parameter that is marked as 'ByRef' versus 'ByVal'.
Is there a way to override just the checkspelling function or is there an easier way to do this. All that I am after is the words I spell wrong and maybe the wrong way I spelled it.
I thought the way to do this would be to override the checkspelling method in Microsoft.Offic e.Interop.Word. DocumentClass . When I try to override that one function I get an error:
COM Interop registration failed. Type library exporter encountered an error while processing 'OfficeSpelling Addin'. Error: Type library exporter can not load type OfficeSpellingA ddin.Connect (error: System.TypeLoad Exception: Types extending from COM objects should override all methods of an interface implemented by the base COM class.).
Therefore I took all of the methods and properties (need both to get the error above to go away) and made overrides for them (If you want this code I can send it to you – it was a lot of work). But a few properties have byref and I get this error:
D:\Visual Studio Projects\Office SpellingAddin\C onnect.vb(550): 'Public Overrides Property ClickAndTypePar agraphStyle() As Object' cannot override 'Public Overridable Property ClickAndTypePar agraphStyle() As Object' because they differ by a parameter that is marked as 'ByRef' versus 'ByVal'.
Is there a way to override just the checkspelling function or is there an easier way to do this. All that I am after is the words I spell wrong and maybe the wrong way I spelled it.
Comment