code for adding dictionaries with Word 2007?

G

gil

Hi All,



My Word2003 code for adding spelling dictionaries does not seem to work in Word2007. How can I fix it?



ActiveDocument.ShowGrammaticalErrors = True

ActiveDocument.ShowSpellingErrors = True

Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201a.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201c.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

End With



I wish to keep my custom dictionaries in the same folder as the attached template. It facilitates mobile use from one computer to another. I am currently using Office Home and Student altho I will be getting the professional version in the near future.



tia,

Gil
 
G

gil

Ps. I see that I have clear all twice in the post although not in real life.
Gil
Hi All,



My Word2003 code for adding spelling dictionaries does not seem to work in Word2007. How can I fix it?



ActiveDocument.ShowGrammaticalErrors = True

ActiveDocument.ShowSpellingErrors = True

Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201a.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201c.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

End With



I wish to keep my custom dictionaries in the same folder as the attached template. It facilitates mobile use from one computer to another. I am currently using Office Home and Student altho I will be getting the professional version in the near future.



tia,

Gil
 
G

gil

I think I finally got it:



Sub dictionaryAdd6()

With CustomDictionaries

.ClearAll

End With

Dim dic1, dic2, dic3, dic4, dic5 As String

dic1 = ActiveDocument.AttachedTemplate.Path & "\custom201a.dic"

dic2 = ActiveDocument.AttachedTemplate.Path & "\TSMRmedDict.dic"

dic3 = ActiveDocument.AttachedTemplate.Path & "\TSMRspellDrug.dic"

dic4 = ActiveDocument.AttachedTemplate.Path & "\MedTerms.dic"

dic5 = ActiveDocument.AttachedTemplate.Path & "\cmr1medDict.dic"

Application.CustomDictionaries.Add dic1

Application.CustomDictionaries.Add dic2

Application.CustomDictionaries.Add dic3

Application.CustomDictionaries.Add dic4

Application.CustomDictionaries.Add dic5

End Sub



Cheers,

Gil

Ten Second Medical RecordTM electronic medical records

Hi All,



My Word2003 code for adding spelling dictionaries does not seem to work in Word2007. How can I fix it?



ActiveDocument.ShowGrammaticalErrors = True

ActiveDocument.ShowSpellingErrors = True

Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201a.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201c.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

End With



I wish to keep my custom dictionaries in the same folder as the attached template. It facilitates mobile use from one computer to another. I am currently using Office Home and Student altho I will be getting the professional version in the near future.



tia,

Gil
 
G

gil

I thought I had it ... but I seem to be going in a circle.
:(
Gil
Hi All,



My Word2003 code for adding spelling dictionaries does not seem to work in Word2007. How can I fix it?



ActiveDocument.ShowGrammaticalErrors = True

ActiveDocument.ShowSpellingErrors = True

Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201a.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

With CustomDictionaries

.ClearAll

With .Add(ActiveDocument.AttachedTemplate.Path & "\Custom201c.dic")

.LanguageSpecific = True

' .LanguageID = wdEnglishUS

End With

End With



I wish to keep my custom dictionaries in the same folder as the attached template. It facilitates mobile use from one computer to another. I am currently using Office Home and Student altho I will be getting the professional version in the near future.



tia,

Gil
 

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