I have vba code that runs on AutoOpen when the document opens it sets the spellcheck value to False
another set of code runs when the document closes on AutoClose and it checks the spellcheck value
The auto close code always finds that spellcheck is true, indicating that spellcheck has been run. Since I set the value to false on the auto open it should read false. Any idea of why it is switching to True? Thanks
another set of code runs when the document closes on AutoClose and it checks the spellcheck value
The auto close code always finds that spellcheck is true, indicating that spellcheck has been run. Since I set the value to false on the auto open it should read false. Any idea of why it is switching to True? Thanks
Code:
Sub AutoOpen()
Dim strDocName As String
strDocName = ActiveDocument.Name
Documents(strDocName).SpellingChecked = False
boSpellingChecked = Documents(strDocName).SpellingChecked
MsgBox boSpellingChecked
End Sub
Sub AutoClose()
Dim boSpellingChecked As String
Dim strDocName As String
strDocName = ActiveDocument.Name
boSpellingChecked = Documents(strDocName).SpellingChecked
MsgBox boSpellingChecked
End Sub