Sub Clean4DVX() ' Macro for avoiding codes in Atril DVX. ' http://www.atril.com ' Inspired by ideas of DVX users on ' the dejavu-l mailing list ' http://groups.yahoo.com/group/dejavu-l/ ' and help_ list ' http://groups.yahoo.com/group/help_/ ' Derived from a macro by Nelson Laterman ' http://www.necco.ca/dv/word.htm#Rogue_codes ' http://www.necco.ca/dv/macros/word/Clean_Rogue_Codes.txt ' itself based on Steven Marzuola's suggestions. Call tracks Call language Call softhyphen Call scaling End Sub Sub tracks() 'Deactivate track revisions 'Accept all revisions 'Deactivate automatic hyphenation 'Remove smart tags and linguistic data With ActiveDocument .AcceptAllRevisions .TrackRevisions = False .AutoHyphenation = False .HyphenateCaps = False .RemoveSmartTags .EmbedSmartTags = False .EmbedLinguisticData = False End With End Sub Sub scaling() 'Remove different scaling, position and spacing Selection.WholeStory With Selection.Font .Spacing = 0 .scaling = 100 .Position = 0 End With Selection.MoveLeft Unit:=wdCharacter, Count:=1 End Sub Sub language() ' Change language to German ' If you want to change to another language, you can change the ' language ID below. ' Example of language IDs: wdFrench, wdEnglishUK, wdEnglishUS, wdGerman, ' wdSwissFrench, wdSwissGerman, wdSwissItalian ' See http://msdn2.microsoft.com/en-us/library/bb213877.aspx Dim aRange For Each aRange In ActiveDocument.StoryRanges With aRange.Find .ClearFormatting .Format = True .Font.Hidden = False .Replacement.ClearFormatting .Replacement.LanguageID = wdGerman .Replacement.NoProofing = False .Execute Forward:=True, Replace:=wdReplaceAll, FindText:="", ReplaceWith:="" End With Next aRange End Sub Sub softhyphen() ' Remove optional hyphens For Each aRange In ActiveDocument.StoryRanges Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^-" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = False End With Selection.Find.Execute Replace:=wdReplaceAll Next aRange End Sub