ActiveWritingStyle Property

Applies To

Document object.

Description

Returns or sets the writing style for a specified language in the specified document. Read/write String.

Note The WritingStyleList property returns an array of the names of the available writing styles.

Syntax

expression.ActiveWritingStyle(LanguageID)

expression Required. An expression that returns a Document object.

LanguageID Required Variant. The language you want to set the writing style for in the specified document. Can be either a string or one of the following WdLanguageID constants:

  • wdAfrikaans
  • wdArabic
  • wdBasque
  • wdBelgianDutch
  • wdBelgianFrench
  • wdBrazilianPortuguese
  • wdBulgarian
  • wdByelorussian
  • wdCatalan
  • wdCroation
  • wdCzech
  • wdDanish
  • wdDutch
  • wdEnglishAUS
  • wdEnglishCanadian
  • wdEnglishNewZealand

  • wdEnglishSouthAfrica
  • wdEnglishUK
  • wdEnglishUS
  • wdEstonian
  • wdFarsi
  • wdFinnish
  • wdFrench
  • wdFrenchCanadian
  • wdGerman
  • wdGreek
  • wdHebrew
  • wdHungarian
  • wdIcelandic
  • wdItalian
  • wdJapanese
  • wdKorean
  • wdLatvian
  • wdMacedonian
  • wdMalaysian
  • wdMexicanSpanish
  • wdNorwegianBokmol
  • wdNorwegianNynorsk
  • wdPolish
  • wdPortuguese
  • wdRomanian
  • wdRussian
  • wdSerbianCyrillic
  • wdSerbianLatin
  • wdSesotho
  • wdSimplifiedChinese
  • wdSlovak
  • wdSlovenian
  • wdSpanish
  • wdSpanishModernSort
  • wdSwedish
  • wdSwissFrench
  • wdSwissGerman
  • wdSwissItalian
  • wdTraditionalChinese
  • wdTsonga
  • wdTswana
  • wdTurkish
  • wdUkrainian
  • wdVenda
  • wdXhosa
  • wdZulu

See Also

DefaultWritingStyle property, WritingStyleList property.

Example

This example sets the writing style used for French, German, and U.S. English for the active document. You must have the grammar files installed for French, German, and US English to run this example.

With ActiveDocument
    .ActiveWritingStyle(wdFrench) = "Commercial"
    .ActiveWritingStyle(wdGerman) = "Technisch/Wiss"
    .ActiveWritingStyle(wdEnglishUS) = "Technical"
End With
This example returns the writing style for the language of the selection.

myLang = Selection.LanguageID
MsgBox ActiveDocument.ActiveWritingStyle(myLang)