Code Examples

Amend AutoCorrect Settings

acCmdInsertHyperlink

The following code opens the AutoCorrect Dialog box.

'***************** Code Start *******************
'Original code by Terry Wickenden

Private Sub cmdAutoCorrect_Click()
    On Error GoTo ErrAutoCorrect
    
    DoCmd.RunCommand acCmdAutoCorrect
    Exit Sub

ErrAutoCorrect:
    Select Case Err
        Case 2046
            'Command not available
            MsgBox "AutoCorrect is not available at this time.", vbCritical, "Not Available"
        Case 2501
            'Cancel selected in dialog box - do nothing
        Case Else
            MsgBox Err.Number & ":-" & vbCrLf & Err.Description
    End Select
    
End Sub
'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.