I am using Access 2010 Runtime to run my custom database application. Office 2000 professional is also installed on the same machine. I use DoCmd.RunCommand acCmdSpelling
a couple different place to perform a spell check on the data entered.
This works great on the full version of Access 2000 but when I open it up in 2010 Runtime I get the message MS Access can't start the spell checker because it isnt' installed
. I know if the full version of Office isn't instal开发者_高级运维led the spell checking won't work.
Now for my question. The full version of Office is installed, but it is a different version. Is there any way to make Access 2010 Runtime use the Office 2000 proofing tools?
I really want to use 2010 runtime because of several UI improvements that my application uses. I know that I could go back to Access 2000 but that would be a last resort.
A late answer but it is still current...
Actually you can install the spellcheck and proofing tools via Microsoft SharePoint Designer 2010.
- Download Microsoft SharePoint Designer 2010 from Microsoft and open it
- Choose Customize
- Click the Microsoft Sharepoint Designer icon and choose Not available
- Expand Office Shared Features and then Proofing Tools
- Customize the tools by expanding the languages ensuring Spelling and Grammar checkers is selected
- Install
Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If you could find a control with spell checking using a third party library, that might work.
Using Excel's VBA Functions in MS Access:
You can call Excel functions from Access by adding a reference to Excel.
In the Access VBA Project, go Tools
→ References
, and then locate and include the library "Microsoft Excel 16.0 Object Library
" (or the newest version you have).
Then create an object referring to an Excel Application and call whatever commands as required.
For example, to check the spelling of a word or phrase:
Sub demo_Spellcheck()
Dim textToCheck As String, excel As New excel.Application 'create Excel object
textToCheck = InputBox("Enter a word or phrase:", "Spellcheck", "blah blah")
If excel.Application.CheckSpelling(textToCheck) Then 'check spelling
MsgBox textToCheck & vbLf & "is spelled Correctly", 64 'TRUE = correct
Else
MsgBox textToCheck & vbLf & "is mis-spelled", 16 'FALSE = misspelled
End If
Set excel = Nothing 'always cleanup after your objects
End Sub
More Information:
- Office Docs :
Application.CheckSpelling
method (Excel) - Office Docs :
Application.WorksheetFunction
property (Excel)
精彩评论