Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007 set spell check to false on document open

Status
Not open for further replies.

RCinSTP

Programmer
Oct 10, 2012
5
US
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
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
 
I needed a fix really fast so I cross posted this question and received a response that solved the problem, see the solution at:
vbaexpress
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top