Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Using Office 2007.
I have a project to enter data in an Excel workbook and then generate a Word document from the Excel data. This is working wonderfully and is stable. Unfortunately, I found that the Mergefields in the Word template are exempt from the Spell Check tool within Word. I have performed the Ctrl-A, Review- Set Language and disable the "Do not check spelling or grammar." This does not work, as the Mergefields are immediately reset to "Do not check spelling or grammar." I then inserted a bit of VBA code in the template: Sub Document_Open() With ActiveDocument.Range .NoProofing = False .LanguageID = wdEnglishUS End With End Sub and saved the template as macro-enabled (.dotm). The code in Excel to generate the document was modified to access the new template and to also save the document as .docm using FileFormat:=wdFormatXMLDocumentMacroEnabled in the SaveAs statement. Unfortunately, the VBA does not save to the new document, so therefore will not run when opened. If I manually enter the VBA code into the document and save it, the code will run the next time the document is opened and Spell Check works as needed. Question: 1) How do I ensure that the VBA is carried from the .dotm template to the .docm document? |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spell check not working???? | Microsoft Word Help | |||
Spell Check still not working | Microsoft Word Help | |||
Spell check and mergefields | Mailmerge | |||
Spell Check Not working | Microsoft Word Help | |||
SPELL CHECK AND GRAMAR CHECK IS NOT WORKING IN OFFICE 2003......P. | New Users |