Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    Hi all,
    I'm having an issue I'm sure you smart lot could help me with. I've created an email signature in Outlook 2007. The signature contains words (Regards, Dennis etc) and also a logo below the words and when using this signature the spell check works fine.
    If i put in another logo at the top of the page, anything I wrote between the top and bottom logos won't get checked by spell check for errors. Is this normal? Is there a way around this?

    Cheers in advance. Dennis

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by Dennis Duff View Post
    I've created an email signature in Outlook 2007. The signature contains words (Regards, Dennis etc) and also a logo below the words and when using this signature the spell check works fine.
    If i put in another logo at the top of the page, anything I wrote between the top and bottom logos won't get checked by spell check for errors. Is this normal? Is there a way around this?
    When you say you put a logo at the top of the page, are you using Insert > Picture, or is it part of your signature, or are you copying it from your signature?

    As noted in [topic=764123]Spell check fix[/topic], in Outlook 2007 (and presumably 2010), signatures are marked with the "No Proofing" property set to true, which instructs the spell checker to ignore them. It is possible to clear No Proofing from your message using code. I wrote a procedure a few years ago that would trigger when you sent a message, but it had stability and user acceptance issues (running spell check twice was unpopular), so I don't think anyone still is using that code around here. There may well be clear that setting in the background so it is automatic, but I haven't stopped to think about it.

    (I'm on Office 2003 on this computer, so I don't have the critical snippet of code handy, sorry, I will look for it later.)

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Here's the code to remove the spell-check immunity from all paragraphs in a message, signature or not:

    Code:
    Sub MarkProofing()
    ' Check for an open email message
    If Inspectors.Count = 0 Then Exit Sub
    If ActiveInspector.Class <> olMail Then Exit Sub
    ' Iterate through the paragraphs and set the noproofing property to false
    Dim wdEd As Object, intCount As Integer, par As Object
    Set wdEd = ActiveInspector.WordEditor
    For intCount = 1 To wdEd.Paragraphs.Count
        Set par = wdEd.Paragraphs.Item(intCount).Range
        If Len(par.Text) > 4 Then
            ' Try to skip any forwarded or replied-to message
            If LCase(Left(par.Text, 6)) = "from: " Then Exit For
            ' Otherwise, remove the immunity to spell checking
            par.noproofing = False
        End If
    Next
    ' Report and clean up
    Debug.Print "Examined: " & intCount & " of " & wdEd.Paragraphs.Count
    Set wdEd = Nothing
    End Sub

  4. #4
    New Lounger
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Awesome thanks.
    Yeah the top logo is part of the signature and therefore are trying to type in the middle of the signature.

    They were just typing above the signature and then copy/paste into the middle!!

    Thanks for the reply. Appreciated

  5. #5
    New Lounger
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Lightbulb Also change the Language to English

    Quote Originally Posted by jscher2000 View Post
    Here's the code to remove the spell-check immunity from all paragraphs in a message, signature or not:

    Code:
    Sub MarkProofing()
    ' Check for an open email message
    If Inspectors.Count = 0 Then Exit Sub
    If ActiveInspector.Class <> olMail Then Exit Sub
    ' Iterate through the paragraphs and set the noproofing property to false
    Dim wdEd As Object, intCount As Integer, par As Object
    Set wdEd = ActiveInspector.WordEditor
    For intCount = 1 To wdEd.Paragraphs.Count
        Set par = wdEd.Paragraphs.Item(intCount).Range
        If Len(par.Text) > 4 Then
            ' Try to skip any forwarded or replied-to message
            If LCase(Left(par.Text, 6)) = "from: " Then Exit For
            ' Otherwise, remove the immunity to spell checking
            par.noproofing = False
        End If
    Next
    ' Report and clean up
    Debug.Print "Examined: " & intCount & " of " & wdEd.Paragraphs.Count
    Set wdEd = Nothing
    End Sub
    Outlook doesn't spell check the signature and the above code works.

    Originally created the following small macro to change the Language to English and to Spell Check the selected text. This macro works within Word 2010 and Excel 2010, but does nothing under Outlook 2010.

    Sub Spelling_US()
    Selection.LanguageID = wdEnglishUS
    Selection.NoProofing = False
    End Sub



    Your longer macro is able to change the NoProofing to False. But I am not able to change the language, as sometimes I need to reply in English and sometimes in Spanish.

    I commented the 2nd and 3rd line as it wasn't working with them.

    Sub MarkProofing()
    ' Check for an open email message
    'If Inspectors.Count = 0 Then Exit Sub
    'If ActiveInspector.Class <> olMail Then Exit Sub
    ' Iterate through the paragraphs and set the noproofing property to false
    Dim wdEd As Object, intCount As Integer, par As Object
    Set wdEd = ActiveInspector.WordEditor
    For intCount = 1 To wdEd.Paragraphs.Count
    Set par = wdEd.Paragraphs.Item(intCount).Range
    If Len(par.Text) > 4 Then
    ' Try to skip any forwarded or replied-to message
    If LCase(Left(par.Text, 5)) = "from:" Then Exit For
    ' Otherwise, remove the immunity to spell checking
    par.NoProofing = False 'THIS WORKS OK
    ' change the language to English
    par.LanguageID = wdEnglishUS 'THIS DOESN'T WORK
    End If
    Next
    ' Report and clean up
    Debug.Print "Examined: " & intCount & " of " & wdEd.Paragraphs.Count
    Set wdEd = Nothing
    Set par = Nothing
    'MsgBox ("MarkProofing finished")
    End Sub


    Both macros reside within "ThisOutlookSession".

    Any suggestions would be appreciated.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by trulyhealthy View Post
    Originally created the following small macro to change the Language to English and to Spell Check the selected text. This macro works within Word 2010 and Excel 2010, but does nothing under Outlook 2010.

    Sub Spelling_US()
    Selection.LanguageID = wdEnglishUS
    Selection.NoProofing = False
    End Sub
    Outlook doesn't have good support for the Selection object, unfortunately.

    Quote Originally Posted by trulyhealthy View Post
    Your longer macro is able to change the NoProofing to False. But I am not able to change the language, as sometimes I need to reply in English and sometimes in Spanish.

    I commented the 2nd and 3rd line as it wasn't working with them.
    Regarding the third line, apparently it's a difference from Outlook 2007. Here is the updated version for Outlook 2010:

    Code:
    Sub MarkProofing()
    ' Check for an open email message ' Updated for Outlook 2010 on 11/1/11
    If Inspectors.Count = 0 Then Exit Sub
    If ActiveInspector.CurrentItem.Class <> olMail Then Exit Sub
    ' Iterate through the paragraphs and set the noproofing property to false
    Dim wdEd As Object, intCount As Integer, par As Object
    Set wdEd = ActiveInspector.WordEditor
    For intCount = 1 To wdEd.Paragraphs.Count
        Set par = wdEd.Paragraphs.Item(intCount).Range
        If Len(par.Text) > 4 Then
            ' Try to skip any forwarded or replied-to message
            If LCase(Left(par.Text, 6)) = "from: " Then Exit For
            ' Otherwise, remove the immunity to spell checking
            par.noproofing = False
        End If
    Next
    ' Report and clean up
    Debug.Print "Examined: " & intCount & " of " & wdEd.Paragraphs.Count
    Set wdEd = Nothing
    End Sub
    With respect to the language, you're almost there. The problem is that wdEnglishUS isn't defined in Outlook, so you have to define it yourself:

    Code:
    Sub MarkProofingEnUS()
    ' Check for an open email message
    If Inspectors.Count = 0 Then Exit Sub
    If ActiveInspector.CurrentItem.Class <> olMail Then Exit Sub
    ' Iterate through the paragraphs and set the noproofing property to false
    Dim wdEd As Object, intCount As Integer, par As Object
    ' Define language constant(s)
    Const wdEnglishUS = 1033
    Set wdEd = ActiveInspector.WordEditor
    For intCount = 1 To wdEd.Paragraphs.Count
        Set par = wdEd.Paragraphs.Item(intCount).Range
        If Len(par.Text) > 4 Then
            ' Try to skip any forwarded or replied-to message
            If LCase(Left(par.Text, 6)) = "from: " Then Exit For
            ' Otherwise, remove the immunity to spell checking
            par.noproofing = False
            ' Set language
            par.LanguageID = wdEnglishUS
        End If
    Next
    ' Report and clean up
    Debug.Print "Examined: " & intCount & " of " & wdEd.Paragraphs.Count
    Set wdEd = Nothing
    End Sub

  7. The Following User Says Thank You to jscher2000 For This Useful Post:

    trulyhealthy (2011-11-03)

  8. #7
    New Lounger
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Awesome! Works great.

    For Spanish I copy and paste changing the following 2 lines:
    Const wdMexicanSpanish = 2058
    par.LanguageID = wdMexicanSpanish

    WdLanguageID Enumeration from http://msdn.microsoft.com/en-us/libr...ice.12%29.aspx

    Peculiar that Microsoft doesn't provide the option to spell check the signature, forcing everybody to do complicated macros and then manually running it each time.

    Peculiar as well that Microsoft doesn't provide same macro capability in all Office products.

    Thanks for your expertise

  9. #8
    New Lounger
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Additionally to above, I need to create another macro that works in Outlook 2010 to "not check spelling" for the selected text. The following is the general idea:

    Sub SelectedTextNoProofing()
    ' Check for an open email message
    If Inspectors.Count = 0 Then Exit Sub
    If ActiveInspector.CurrentItem.Class <> olMail Then Exit Sub
    ' Remove spell checking
    ActiveInspector.WordEditor.SelectedText.NoProofing = True 'THIS DOESN'T WORK
    End Sub


    The following only works in Word and Excel 2010:
    Sub SelectedTextNoProofing()
    Selection.NoProofing = True
    End Sub


    Any suggestions would be appreciated.

  10. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by trulyhealthy View Post
    Additionally to above, I need to create another macro that works in Outlook 2010 to "not check spelling" for the selected text.
    As noted above, Outlook does not have good support for the type of Selection object you can manipulate in Word. There is a third party COM library that you could try. However, it does have a little bit of a learning curve. Redemption > SafeInspector Object. (Redemption is free for testing and developing your VBA procedures, but if you want to package and distribute it, you need to buy a license.)

    EDIT: Never mind, Redemption gets you the text in the selection, but you don't get a selection object you can use to identify a range in the message to manipulate.

    EDIT #2: In the short run, I think you have to continue using the Set Proofing Language dialog to turn off proofing for a selection. At least you can add it to the Quick Access Toolbar so you don't have to click back and forth on the ribbon.
    Last edited by jscher2000; 2011-11-04 at 02:14. Reason: Awww, bummer.

  11. #10
    New Lounger
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you again for taking the time.

    I will continue using the "Set Proofing Language" dialog to turn off proofing for a selection. Already followed your suggestion to add it to the Quick Access Toolbar.

    Once again, peculiar that Microsoft doesn't provide same macro capability in all Office products; it should be obvious and simpler for all.

    Thanks for your expertise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •