Spelling and Grammer Options

R

Ravi

Can anybody tell me how to change following Spelling and
Grammer options through VBA

Tools-->Options-->Spelling & Grammer
click "Settings" Tab under Grammer section
1. Comma required before last list item:
always|never|don't check
2. Punctuation required with quotes: inside|outside|don't
check
3. Space required between sentences: 1|2|don't check

and other Grammer and Style options

Thanks in advance

Regards

Ravi
 
W

Word Heretic

G'day "Ravi" <[email protected]>,

All you can do is change between settings for

ActiveDocument.ActiveWritingStyle

eg Technical, Standard and so on.

Otherwise you have to resort to send keys :-( This example just sets
comma required before last list item to never.

Sub GrammarOptions()
SendKeys "%t" 'load the grammar settings
SendKeys "{TAB}" 'enter the settings area
SendKeys "{DOWN}" 'move to first line
SendKeys "{DOWN}" 'move to Comma Required
SendKeys " " 'select dropdown
SendKeys "{DOWN}" 'Select ALWAYS
SendKeys "{DOWN}" 'Select NEVER
SendKeys "{ENTER}" 'Exit dropdown, save changes
'Add extra settings in here
SendKeys "{TAB}" 'Select OK
SendKeys "{ENTER}" 'Save grammar changes
SendKeys "{ENTER}" 'Save Options changes
Dialogs(wdDialogToolsOptionsSpellingAndGrammar).Show
End Sub


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Ravi reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top