Thread: Spell CHeckin
View Single Post
 
Old 07-27-2021, 12:52 PM
Charles Kenyon Charles Kenyon is online now Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You could add the spelling characteristic of "do not check spelling or grammar" to the Emphasis style and use that style for your Italics.

Here are macros to create a separate no-spell-check style. I added the Italics code to it. Note that Italics is a toggle control. When applied to text already in Italics, it turns it off. Instructions for Installing Macros from Forums or Websites by Graham Mayor, MVP

Code:
Sub NoSpellCheckStyle()  ' SEE ALSO ASSIGNSHORTCUTNOSPELLCHECK FOLLOWING
    ' Charles Kenyon
    ' Creates a character style named "No Spell Check" in the Active Document
    ' Does NOT apply the style to a selection, simply creates the style
    ' 12 April 2019
    '
    Dim stlNoCheck As Style
    '
    On Error GoTo ErrorAlreadyExists
    Set stlNoCheck = ActiveDocument.Styles.Add(Name:="No Spell Check", Type:=wdStyleTypeCharacter)
    On Error GoTo -1
    With stlNoCheck
        .Font.Name = ""
        .NoProofing = True
        .Font.Italic = True
    End With
    GoTo ExitSub
ErrorAlreadyExists:
    MsgBox Prompt:="Style 'No Spell Check' already exists", Buttons:=vbInformation, title:="Oops"
ExitSub:
    Set stlNoCheck = Nothing
End Sub

Sub AssignShortcutNoSpellCheck()
'
' Charles Kenyon ---- GOES WITH PREVIOUS MACRO
' 2 March 2021
' Assigns keyboard shortcut Ctrl+Shift+Alt+N to No Spell Check style
'   Style must exist
'   Saves this in the active document
'
    CustomizationContext = ActiveDocument ' Change ActiveDocument to NormalTemplate if style is in Normal Template
    KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyN, wdKeyControl, _
        wdKeyShift, wdKeyAlt), _
        KeyCategory:=wdKeyCategoryStyle, _
        Command:="No Spell Check"
End Sub
Reply With Quote