Vba 如何使某些文本的所有实例都上标?
如何使用find和replace在Word文档中循环以使某些文本的所有实例都上标 我尝试了很多方法Vba 如何使某些文本的所有实例都上标?,vba,ms-word,Vba,Ms Word,如何使用find和replace在Word文档中循环以使某些文本的所有实例都上标 我尝试了很多方法 子查找() 变暗Rng As范围 Dim-Fnd为布尔型 设置Rng=选择范围 用Rng.Find .ClearFormatting .执行FindText:=“第四”,Forward:=真_ 格式:=False,换行:=wdFindStop Fnd=.Found 以 如果Fnd=True,则 带Rng .MoveStart字符,1 .Font.Superscript=True 以 如果结束 直到
子查找()
变暗Rng As范围
Dim-Fnd为布尔型
设置Rng=选择范围
用Rng.Find
.ClearFormatting
.执行FindText:=“第四”,Forward:=真_
格式:=False,换行:=wdFindStop
Fnd=.Found
以
如果Fnd=True,则
带Rng
.MoveStart字符,1
.Font.Superscript=True
以
如果结束
直到Fnd=False为止
用Rng.Find
.ClearFormatting
.执行FindText:=“第四”,Forward:=真_
格式:=False,换行:=wdFindStop
Fnd=.Found
以
如果Fnd=True,则
带Rng
.MoveStart字符,1
.Font.Superscript=True
以
如果结束
环
端接头
我希望它能改变'4th'每个实例的最后两个字符。它更改第一个实例并结束
最后,我想将最后两个字符(1、2、3等)的所有实例都改为上标。我找不到通配符来执行此操作。是否可以使用通配符?下面的代码将上标应用于任何顺序后缀(st、nd、rd、th)
好的,这是我的第二次尝试,使用word的自动格式化功能-而且-我不是专家
- 获取以后的每个选项
- 将每个选项设置为false-AutoFormatReplaceOrdinals除外
- 自动格式化文档
- 将每个选项设置回原来的状态
Private Sub AutoFormat_Make_Ordinal_Suffixes_Superscript()
'
' affects ALL document content - body and tables
'
' get autoformat options into array
' set autoformat options to false except AutoFormatReplaceOrdinals = True
' autoformat the document
' set autoformat options back to what they were
'
' WARNING: autoformat will affect ADD extra document content
' ie., headings/numbering/list continue/extra styles
'
' https://stackoverflow.com/questions/58172914/how-to-make-all-instances-of-certain-text-superscript
' https://www.tek-tips.com/viewthread.cfm?qid=1121138
' https://docs.microsoft.com/en-us/office/vba/api/word.options
'
Dim arrAutoFormatOptions(38)
Dim StartTime As Single
StartTime = Timer
' read all autoformat options
arrAutoFormatOptions(0) = Options.AutoFormatApplyBulletedLists
arrAutoFormatOptions(1) = Options.AutoFormatApplyFirstIndents
arrAutoFormatOptions(2) = Options.AutoFormatApplyHeadings
arrAutoFormatOptions(3) = Options.AutoFormatApplyLists
arrAutoFormatOptions(4) = Options.AutoFormatApplyOtherParas
arrAutoFormatOptions(5) = Options.AutoFormatAsYouTypeApplyBorders
arrAutoFormatOptions(6) = Options.AutoFormatAsYouTypeApplyBulletedLists
arrAutoFormatOptions(7) = Options.AutoFormatAsYouTypeApplyClosings
arrAutoFormatOptions(8) = Options.AutoFormatAsYouTypeApplyDates
arrAutoFormatOptions(9) = Options.AutoFormatAsYouTypeApplyFirstIndents
arrAutoFormatOptions(10) = Options.AutoFormatAsYouTypeApplyHeadings
arrAutoFormatOptions(11) = Options.AutoFormatAsYouTypeApplyNumberedLists
arrAutoFormatOptions(12) = Options.AutoFormatAsYouTypeApplyTables
arrAutoFormatOptions(13) = Options.AutoFormatAsYouTypeAutoLetterWizard
arrAutoFormatOptions(14) = Options.AutoFormatAsYouTypeDefineStyles
arrAutoFormatOptions(15) = Options.AutoFormatAsYouTypeDeleteAutoSpaces
arrAutoFormatOptions(16) = Options.AutoFormatAsYouTypeFormatListItemBeginning
arrAutoFormatOptions(17) = Options.AutoFormatAsYouTypeInsertClosings
arrAutoFormatOptions(18) = Options.AutoFormatAsYouTypeInsertOvers
arrAutoFormatOptions(19) = Options.AutoFormatAsYouTypeMatchParentheses
arrAutoFormatOptions(20) = Options.AutoFormatAsYouTypeReplaceFarEastDashes
arrAutoFormatOptions(21) = Options.AutoFormatAsYouTypeReplaceFractions
arrAutoFormatOptions(22) = Options.AutoFormatAsYouTypeReplaceHyperlinks
arrAutoFormatOptions(23) = Options.AutoFormatAsYouTypeReplaceOrdinals
arrAutoFormatOptions(24) = Options.AutoFormatAsYouTypeReplacePlainTextEmphasis
arrAutoFormatOptions(25) = Options.AutoFormatAsYouTypeReplaceQuotes
arrAutoFormatOptions(26) = Options.AutoFormatAsYouTypeReplaceSymbols
arrAutoFormatOptions(27) = Options.AutoFormatDeleteAutoSpaces
arrAutoFormatOptions(28) = Options.AutoFormatMatchParentheses
arrAutoFormatOptions(29) = Options.AutoFormatPlainTextWordMail
arrAutoFormatOptions(30) = Options.AutoFormatPreserveStyles
arrAutoFormatOptions(31) = Options.AutoFormatReplaceFarEastDashes
arrAutoFormatOptions(32) = Options.AutoFormatReplaceFractions
arrAutoFormatOptions(33) = Options.AutoFormatReplaceHyperlinks
arrAutoFormatOptions(34) = Options.AutoFormatReplaceOrdinals
arrAutoFormatOptions(35) = Options.AutoFormatReplacePlainTextEmphasis
arrAutoFormatOptions(36) = Options.AutoFormatReplaceQuotes
arrAutoFormatOptions(37) = Options.AutoFormatReplaceSymbols
' disable all autoformat options
With Options
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyFirstIndents = False
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatAsYouTypeApplyBorders = False
.AutoFormatAsYouTypeApplyBulletedLists = False
.AutoFormatAsYouTypeApplyClosings = False
.AutoFormatAsYouTypeApplyDates = False
.AutoFormatAsYouTypeApplyFirstIndents = False
.AutoFormatAsYouTypeApplyHeadings = False
.AutoFormatAsYouTypeApplyNumberedLists = False
.AutoFormatAsYouTypeApplyTables = False
.AutoFormatAsYouTypeAutoLetterWizard = False
.AutoFormatAsYouTypeDefineStyles = False
.AutoFormatAsYouTypeDeleteAutoSpaces = False
.AutoFormatAsYouTypeFormatListItemBeginning = False
.AutoFormatAsYouTypeInsertClosings = False
.AutoFormatAsYouTypeInsertOvers = False
.AutoFormatAsYouTypeMatchParentheses = False
.AutoFormatAsYouTypeReplaceFarEastDashes = False
.AutoFormatAsYouTypeReplaceFractions = False
.AutoFormatAsYouTypeReplaceHyperlinks = False
.AutoFormatAsYouTypeReplaceOrdinals = False
.AutoFormatAsYouTypeReplacePlainTextEmphasis = False
.AutoFormatAsYouTypeReplaceQuotes = False
.AutoFormatAsYouTypeReplaceSymbols = False
.AutoFormatDeleteAutoSpaces = False
.AutoFormatMatchParentheses = False
.AutoFormatPlainTextWordMail = False
.AutoFormatPreserveStyles = False
.AutoFormatReplaceFarEastDashes = False
.AutoFormatReplaceFractions = False
.AutoFormatReplaceHyperlinks = False
.AutoFormatReplaceOrdinals = True ' true
.AutoFormatReplacePlainTextEmphasis = False
.AutoFormatReplaceQuotes = False
.AutoFormatReplaceSymbols = False
End With
' do the autoformat
Selection.Range.AutoFormat
' revert all autoformat options
With Options
.AutoFormatApplyBulletedLists = arrAutoFormatOptions(0)
.AutoFormatApplyFirstIndents = arrAutoFormatOptions(1)
.AutoFormatApplyHeadings = arrAutoFormatOptions(2)
.AutoFormatApplyLists = arrAutoFormatOptions(3)
.AutoFormatApplyOtherParas = arrAutoFormatOptions(4)
.AutoFormatAsYouTypeApplyBorders = arrAutoFormatOptions(5)
.AutoFormatAsYouTypeApplyBulletedLists = arrAutoFormatOptions(6)
.AutoFormatAsYouTypeApplyClosings = arrAutoFormatOptions(7)
.AutoFormatAsYouTypeApplyDates = arrAutoFormatOptions(8)
.AutoFormatAsYouTypeApplyFirstIndents = arrAutoFormatOptions(9)
.AutoFormatAsYouTypeApplyHeadings = arrAutoFormatOptions(10)
.AutoFormatAsYouTypeApplyNumberedLists = arrAutoFormatOptions(11)
.AutoFormatAsYouTypeApplyTables = arrAutoFormatOptions(12)
.AutoFormatAsYouTypeAutoLetterWizard = arrAutoFormatOptions(13)
.AutoFormatAsYouTypeDefineStyles = arrAutoFormatOptions(14)
.AutoFormatAsYouTypeDeleteAutoSpaces = arrAutoFormatOptions(15)
.AutoFormatAsYouTypeFormatListItemBeginning = arrAutoFormatOptions(16)
.AutoFormatAsYouTypeInsertClosings = arrAutoFormatOptions(17)
.AutoFormatAsYouTypeInsertOvers = arrAutoFormatOptions(18)
.AutoFormatAsYouTypeMatchParentheses = arrAutoFormatOptions(19)
.AutoFormatAsYouTypeReplaceFarEastDashes = arrAutoFormatOptions(20)
.AutoFormatAsYouTypeReplaceFractions = arrAutoFormatOptions(21)
.AutoFormatAsYouTypeReplaceHyperlinks = arrAutoFormatOptions(22)
.AutoFormatAsYouTypeReplaceOrdinals = arrAutoFormatOptions(23)
.AutoFormatAsYouTypeReplacePlainTextEmphasis = arrAutoFormatOptions(24)
.AutoFormatAsYouTypeReplaceQuotes = arrAutoFormatOptions(25)
.AutoFormatAsYouTypeReplaceSymbols = arrAutoFormatOptions(26)
.AutoFormatDeleteAutoSpaces = arrAutoFormatOptions(27)
.AutoFormatMatchParentheses = arrAutoFormatOptions(28)
.AutoFormatPlainTextWordMail = arrAutoFormatOptions(29)
.AutoFormatPreserveStyles = arrAutoFormatOptions(30)
.AutoFormatReplaceFarEastDashes = arrAutoFormatOptions(31)
.AutoFormatReplaceFractions = arrAutoFormatOptions(32)
.AutoFormatReplaceHyperlinks = arrAutoFormatOptions(33)
.AutoFormatReplaceOrdinals = arrAutoFormatOptions(34)
.AutoFormatReplacePlainTextEmphasis = arrAutoFormatOptions(35)
.AutoFormatReplaceQuotes = arrAutoFormatOptions(36)
.AutoFormatReplaceSymbols = arrAutoFormatOptions(37)
End With
''' ' sanity check
''' With Options
''' 'Debug.Print "AutoFormatReplaceOrdinals: "; .AutoFormatReplaceOrdinals
''' Debug.Print "AutoFormatApplyBulletedLists: "; .AutoFormatApplyBulletedLists
''' Debug.Print "AutoFormatApplyFirstIndents: "; .AutoFormatApplyFirstIndents
''' Debug.Print "AutoFormatApplyHeadings: "; .AutoFormatApplyHeadings
''' Debug.Print "AutoFormatApplyLists: "; .AutoFormatApplyLists
''' Debug.Print "AutoFormatApplyOtherParas: "; .AutoFormatApplyOtherParas
''' Debug.Print "AutoFormatAsYouTypeApplyBorders: "; .AutoFormatAsYouTypeApplyBorders
''' Debug.Print "AutoFormatAsYouTypeApplyBulletedLists: "; .AutoFormatAsYouTypeApplyBulletedLists
''' Debug.Print "AutoFormatAsYouTypeApplyClosings: "; .AutoFormatAsYouTypeApplyClosings
''' Debug.Print "AutoFormatAsYouTypeApplyDates: "; .AutoFormatAsYouTypeApplyDates
''' Debug.Print "AutoFormatAsYouTypeApplyFirstIndents: "; .AutoFormatAsYouTypeApplyFirstIndents
''' Debug.Print "AutoFormatAsYouTypeApplyHeadings: "; .AutoFormatAsYouTypeApplyHeadings
''' Debug.Print "AutoFormatAsYouTypeApplyNumberedLists: "; .AutoFormatAsYouTypeApplyNumberedLists
''' Debug.Print "AutoFormatAsYouTypeApplyTables: "; .AutoFormatAsYouTypeApplyTables
''' Debug.Print "AutoFormatAsYouTypeAutoLetterWizard: "; .AutoFormatAsYouTypeAutoLetterWizard
''' Debug.Print "AutoFormatAsYouTypeDefineStyles: "; .AutoFormatAsYouTypeDefineStyles
''' Debug.Print "AutoFormatAsYouTypeDeleteAutoSpaces: "; .AutoFormatAsYouTypeDeleteAutoSpaces
''' Debug.Print "AutoFormatAsYouTypeFormatListItemBeginning: "; .AutoFormatAsYouTypeFormatListItemBeginning
''' Debug.Print "AutoFormatAsYouTypeInsertClosings: "; .AutoFormatAsYouTypeInsertClosings
''' Debug.Print "AutoFormatAsYouTypeInsertOvers: "; .AutoFormatAsYouTypeInsertOvers
''' Debug.Print "AutoFormatAsYouTypeMatchParentheses: "; .AutoFormatAsYouTypeMatchParentheses
''' Debug.Print "AutoFormatAsYouTypeReplaceFarEastDashes: "; .AutoFormatAsYouTypeReplaceFarEastDashes
''' Debug.Print "AutoFormatAsYouTypeReplaceFractions: "; .AutoFormatAsYouTypeReplaceFractions
''' Debug.Print "AutoFormatAsYouTypeReplaceHyperlinks: "; .AutoFormatAsYouTypeReplaceHyperlinks
''' Debug.Print "AutoFormatAsYouTypeReplaceOrdinals: "; .AutoFormatAsYouTypeReplaceOrdinals
''' Debug.Print "AutoFormatAsYouTypeReplacePlainTextEmphasis: "; .AutoFormatAsYouTypeReplacePlainTextEmphasis
''' Debug.Print "AutoFormatAsYouTypeReplaceQuotes: "; .AutoFormatAsYouTypeReplaceQuotes
''' Debug.Print "AutoFormatAsYouTypeReplaceSymbols: "; .AutoFormatAsYouTypeReplaceSymbols
''' Debug.Print "AutoFormatDeleteAutoSpaces: "; .AutoFormatDeleteAutoSpaces
''' Debug.Print "AutoFormatMatchParentheses: "; .AutoFormatMatchParentheses
''' Debug.Print "AutoFormatPlainTextWordMail: "; .AutoFormatPlainTextWordMail
''' Debug.Print "AutoFormatPreserveStyles: "; .AutoFormatPreserveStyles
''' Debug.Print "AutoFormatReplaceFarEastDashes: "; .AutoFormatReplaceFarEastDashes
''' Debug.Print "AutoFormatReplaceFractions: "; .AutoFormatReplaceFractions
''' Debug.Print "AutoFormatReplaceHyperlinks: "; .AutoFormatReplaceHyperlinks
''' Debug.Print "AutoFormatReplaceOrdinals: "; .AutoFormatReplaceOrdinals
''' Debug.Print "AutoFormatReplacePlainTextEmphasis: "; .AutoFormatReplacePlainTextEmphasis
''' Debug.Print "AutoFormatReplaceQuotes: "; .AutoFormatReplaceQuotes
''' Debug.Print "AutoFormatReplaceSymbols: "; .AutoFormatReplaceSymbols
''' End With
Debug.Print "Finished! - time taken was: " & (Timer - StartTime) & " seconds"
End Sub
这样做不需要宏。这只是一个两阶段的查找和替换。第1步找到第4个并替换为上标的“**”。第2步是将上标的“**4”替换为不上标的“4”。此代码是3800多行代码的较大宏的一部分。我希望宏在执行时进行查找和替换,这样用户就不必这样做了。我给出的建议也适用于编码搜索和替换。我从SO和其他网站尝试了许多不同的代码,但我不知道如何循环浏览整个文档进行查找和替换。这非常有用,谢谢!你能不能帮我把这行代码分解一下,让我明白:Const FIND_TEXT As String=“([0-9])([dhnrst]{2,2})([!0-9a-zA-Z]))我需要能够做的另一件事是在st、nd、rd和th大写时放置上标。我需要如何更改上面的代码行才能做到这一点?对于第1点,请查看行前的注释并匹配括号。有关更多详细信息,请尝试“”。对于第2点,如果将“dhnrst”替换为“dhnrst”,您认为会发生什么甚至“dhnrstDHNRST”
Private Sub AutoFormat_Make_Ordinal_Suffixes_Superscript()
'
' affects ALL document content - body and tables
'
' get autoformat options into array
' set autoformat options to false except AutoFormatReplaceOrdinals = True
' autoformat the document
' set autoformat options back to what they were
'
' WARNING: autoformat will affect ADD extra document content
' ie., headings/numbering/list continue/extra styles
'
' https://stackoverflow.com/questions/58172914/how-to-make-all-instances-of-certain-text-superscript
' https://www.tek-tips.com/viewthread.cfm?qid=1121138
' https://docs.microsoft.com/en-us/office/vba/api/word.options
'
Dim arrAutoFormatOptions(38)
Dim StartTime As Single
StartTime = Timer
' read all autoformat options
arrAutoFormatOptions(0) = Options.AutoFormatApplyBulletedLists
arrAutoFormatOptions(1) = Options.AutoFormatApplyFirstIndents
arrAutoFormatOptions(2) = Options.AutoFormatApplyHeadings
arrAutoFormatOptions(3) = Options.AutoFormatApplyLists
arrAutoFormatOptions(4) = Options.AutoFormatApplyOtherParas
arrAutoFormatOptions(5) = Options.AutoFormatAsYouTypeApplyBorders
arrAutoFormatOptions(6) = Options.AutoFormatAsYouTypeApplyBulletedLists
arrAutoFormatOptions(7) = Options.AutoFormatAsYouTypeApplyClosings
arrAutoFormatOptions(8) = Options.AutoFormatAsYouTypeApplyDates
arrAutoFormatOptions(9) = Options.AutoFormatAsYouTypeApplyFirstIndents
arrAutoFormatOptions(10) = Options.AutoFormatAsYouTypeApplyHeadings
arrAutoFormatOptions(11) = Options.AutoFormatAsYouTypeApplyNumberedLists
arrAutoFormatOptions(12) = Options.AutoFormatAsYouTypeApplyTables
arrAutoFormatOptions(13) = Options.AutoFormatAsYouTypeAutoLetterWizard
arrAutoFormatOptions(14) = Options.AutoFormatAsYouTypeDefineStyles
arrAutoFormatOptions(15) = Options.AutoFormatAsYouTypeDeleteAutoSpaces
arrAutoFormatOptions(16) = Options.AutoFormatAsYouTypeFormatListItemBeginning
arrAutoFormatOptions(17) = Options.AutoFormatAsYouTypeInsertClosings
arrAutoFormatOptions(18) = Options.AutoFormatAsYouTypeInsertOvers
arrAutoFormatOptions(19) = Options.AutoFormatAsYouTypeMatchParentheses
arrAutoFormatOptions(20) = Options.AutoFormatAsYouTypeReplaceFarEastDashes
arrAutoFormatOptions(21) = Options.AutoFormatAsYouTypeReplaceFractions
arrAutoFormatOptions(22) = Options.AutoFormatAsYouTypeReplaceHyperlinks
arrAutoFormatOptions(23) = Options.AutoFormatAsYouTypeReplaceOrdinals
arrAutoFormatOptions(24) = Options.AutoFormatAsYouTypeReplacePlainTextEmphasis
arrAutoFormatOptions(25) = Options.AutoFormatAsYouTypeReplaceQuotes
arrAutoFormatOptions(26) = Options.AutoFormatAsYouTypeReplaceSymbols
arrAutoFormatOptions(27) = Options.AutoFormatDeleteAutoSpaces
arrAutoFormatOptions(28) = Options.AutoFormatMatchParentheses
arrAutoFormatOptions(29) = Options.AutoFormatPlainTextWordMail
arrAutoFormatOptions(30) = Options.AutoFormatPreserveStyles
arrAutoFormatOptions(31) = Options.AutoFormatReplaceFarEastDashes
arrAutoFormatOptions(32) = Options.AutoFormatReplaceFractions
arrAutoFormatOptions(33) = Options.AutoFormatReplaceHyperlinks
arrAutoFormatOptions(34) = Options.AutoFormatReplaceOrdinals
arrAutoFormatOptions(35) = Options.AutoFormatReplacePlainTextEmphasis
arrAutoFormatOptions(36) = Options.AutoFormatReplaceQuotes
arrAutoFormatOptions(37) = Options.AutoFormatReplaceSymbols
' disable all autoformat options
With Options
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyFirstIndents = False
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatAsYouTypeApplyBorders = False
.AutoFormatAsYouTypeApplyBulletedLists = False
.AutoFormatAsYouTypeApplyClosings = False
.AutoFormatAsYouTypeApplyDates = False
.AutoFormatAsYouTypeApplyFirstIndents = False
.AutoFormatAsYouTypeApplyHeadings = False
.AutoFormatAsYouTypeApplyNumberedLists = False
.AutoFormatAsYouTypeApplyTables = False
.AutoFormatAsYouTypeAutoLetterWizard = False
.AutoFormatAsYouTypeDefineStyles = False
.AutoFormatAsYouTypeDeleteAutoSpaces = False
.AutoFormatAsYouTypeFormatListItemBeginning = False
.AutoFormatAsYouTypeInsertClosings = False
.AutoFormatAsYouTypeInsertOvers = False
.AutoFormatAsYouTypeMatchParentheses = False
.AutoFormatAsYouTypeReplaceFarEastDashes = False
.AutoFormatAsYouTypeReplaceFractions = False
.AutoFormatAsYouTypeReplaceHyperlinks = False
.AutoFormatAsYouTypeReplaceOrdinals = False
.AutoFormatAsYouTypeReplacePlainTextEmphasis = False
.AutoFormatAsYouTypeReplaceQuotes = False
.AutoFormatAsYouTypeReplaceSymbols = False
.AutoFormatDeleteAutoSpaces = False
.AutoFormatMatchParentheses = False
.AutoFormatPlainTextWordMail = False
.AutoFormatPreserveStyles = False
.AutoFormatReplaceFarEastDashes = False
.AutoFormatReplaceFractions = False
.AutoFormatReplaceHyperlinks = False
.AutoFormatReplaceOrdinals = True ' true
.AutoFormatReplacePlainTextEmphasis = False
.AutoFormatReplaceQuotes = False
.AutoFormatReplaceSymbols = False
End With
' do the autoformat
Selection.Range.AutoFormat
' revert all autoformat options
With Options
.AutoFormatApplyBulletedLists = arrAutoFormatOptions(0)
.AutoFormatApplyFirstIndents = arrAutoFormatOptions(1)
.AutoFormatApplyHeadings = arrAutoFormatOptions(2)
.AutoFormatApplyLists = arrAutoFormatOptions(3)
.AutoFormatApplyOtherParas = arrAutoFormatOptions(4)
.AutoFormatAsYouTypeApplyBorders = arrAutoFormatOptions(5)
.AutoFormatAsYouTypeApplyBulletedLists = arrAutoFormatOptions(6)
.AutoFormatAsYouTypeApplyClosings = arrAutoFormatOptions(7)
.AutoFormatAsYouTypeApplyDates = arrAutoFormatOptions(8)
.AutoFormatAsYouTypeApplyFirstIndents = arrAutoFormatOptions(9)
.AutoFormatAsYouTypeApplyHeadings = arrAutoFormatOptions(10)
.AutoFormatAsYouTypeApplyNumberedLists = arrAutoFormatOptions(11)
.AutoFormatAsYouTypeApplyTables = arrAutoFormatOptions(12)
.AutoFormatAsYouTypeAutoLetterWizard = arrAutoFormatOptions(13)
.AutoFormatAsYouTypeDefineStyles = arrAutoFormatOptions(14)
.AutoFormatAsYouTypeDeleteAutoSpaces = arrAutoFormatOptions(15)
.AutoFormatAsYouTypeFormatListItemBeginning = arrAutoFormatOptions(16)
.AutoFormatAsYouTypeInsertClosings = arrAutoFormatOptions(17)
.AutoFormatAsYouTypeInsertOvers = arrAutoFormatOptions(18)
.AutoFormatAsYouTypeMatchParentheses = arrAutoFormatOptions(19)
.AutoFormatAsYouTypeReplaceFarEastDashes = arrAutoFormatOptions(20)
.AutoFormatAsYouTypeReplaceFractions = arrAutoFormatOptions(21)
.AutoFormatAsYouTypeReplaceHyperlinks = arrAutoFormatOptions(22)
.AutoFormatAsYouTypeReplaceOrdinals = arrAutoFormatOptions(23)
.AutoFormatAsYouTypeReplacePlainTextEmphasis = arrAutoFormatOptions(24)
.AutoFormatAsYouTypeReplaceQuotes = arrAutoFormatOptions(25)
.AutoFormatAsYouTypeReplaceSymbols = arrAutoFormatOptions(26)
.AutoFormatDeleteAutoSpaces = arrAutoFormatOptions(27)
.AutoFormatMatchParentheses = arrAutoFormatOptions(28)
.AutoFormatPlainTextWordMail = arrAutoFormatOptions(29)
.AutoFormatPreserveStyles = arrAutoFormatOptions(30)
.AutoFormatReplaceFarEastDashes = arrAutoFormatOptions(31)
.AutoFormatReplaceFractions = arrAutoFormatOptions(32)
.AutoFormatReplaceHyperlinks = arrAutoFormatOptions(33)
.AutoFormatReplaceOrdinals = arrAutoFormatOptions(34)
.AutoFormatReplacePlainTextEmphasis = arrAutoFormatOptions(35)
.AutoFormatReplaceQuotes = arrAutoFormatOptions(36)
.AutoFormatReplaceSymbols = arrAutoFormatOptions(37)
End With
''' ' sanity check
''' With Options
''' 'Debug.Print "AutoFormatReplaceOrdinals: "; .AutoFormatReplaceOrdinals
''' Debug.Print "AutoFormatApplyBulletedLists: "; .AutoFormatApplyBulletedLists
''' Debug.Print "AutoFormatApplyFirstIndents: "; .AutoFormatApplyFirstIndents
''' Debug.Print "AutoFormatApplyHeadings: "; .AutoFormatApplyHeadings
''' Debug.Print "AutoFormatApplyLists: "; .AutoFormatApplyLists
''' Debug.Print "AutoFormatApplyOtherParas: "; .AutoFormatApplyOtherParas
''' Debug.Print "AutoFormatAsYouTypeApplyBorders: "; .AutoFormatAsYouTypeApplyBorders
''' Debug.Print "AutoFormatAsYouTypeApplyBulletedLists: "; .AutoFormatAsYouTypeApplyBulletedLists
''' Debug.Print "AutoFormatAsYouTypeApplyClosings: "; .AutoFormatAsYouTypeApplyClosings
''' Debug.Print "AutoFormatAsYouTypeApplyDates: "; .AutoFormatAsYouTypeApplyDates
''' Debug.Print "AutoFormatAsYouTypeApplyFirstIndents: "; .AutoFormatAsYouTypeApplyFirstIndents
''' Debug.Print "AutoFormatAsYouTypeApplyHeadings: "; .AutoFormatAsYouTypeApplyHeadings
''' Debug.Print "AutoFormatAsYouTypeApplyNumberedLists: "; .AutoFormatAsYouTypeApplyNumberedLists
''' Debug.Print "AutoFormatAsYouTypeApplyTables: "; .AutoFormatAsYouTypeApplyTables
''' Debug.Print "AutoFormatAsYouTypeAutoLetterWizard: "; .AutoFormatAsYouTypeAutoLetterWizard
''' Debug.Print "AutoFormatAsYouTypeDefineStyles: "; .AutoFormatAsYouTypeDefineStyles
''' Debug.Print "AutoFormatAsYouTypeDeleteAutoSpaces: "; .AutoFormatAsYouTypeDeleteAutoSpaces
''' Debug.Print "AutoFormatAsYouTypeFormatListItemBeginning: "; .AutoFormatAsYouTypeFormatListItemBeginning
''' Debug.Print "AutoFormatAsYouTypeInsertClosings: "; .AutoFormatAsYouTypeInsertClosings
''' Debug.Print "AutoFormatAsYouTypeInsertOvers: "; .AutoFormatAsYouTypeInsertOvers
''' Debug.Print "AutoFormatAsYouTypeMatchParentheses: "; .AutoFormatAsYouTypeMatchParentheses
''' Debug.Print "AutoFormatAsYouTypeReplaceFarEastDashes: "; .AutoFormatAsYouTypeReplaceFarEastDashes
''' Debug.Print "AutoFormatAsYouTypeReplaceFractions: "; .AutoFormatAsYouTypeReplaceFractions
''' Debug.Print "AutoFormatAsYouTypeReplaceHyperlinks: "; .AutoFormatAsYouTypeReplaceHyperlinks
''' Debug.Print "AutoFormatAsYouTypeReplaceOrdinals: "; .AutoFormatAsYouTypeReplaceOrdinals
''' Debug.Print "AutoFormatAsYouTypeReplacePlainTextEmphasis: "; .AutoFormatAsYouTypeReplacePlainTextEmphasis
''' Debug.Print "AutoFormatAsYouTypeReplaceQuotes: "; .AutoFormatAsYouTypeReplaceQuotes
''' Debug.Print "AutoFormatAsYouTypeReplaceSymbols: "; .AutoFormatAsYouTypeReplaceSymbols
''' Debug.Print "AutoFormatDeleteAutoSpaces: "; .AutoFormatDeleteAutoSpaces
''' Debug.Print "AutoFormatMatchParentheses: "; .AutoFormatMatchParentheses
''' Debug.Print "AutoFormatPlainTextWordMail: "; .AutoFormatPlainTextWordMail
''' Debug.Print "AutoFormatPreserveStyles: "; .AutoFormatPreserveStyles
''' Debug.Print "AutoFormatReplaceFarEastDashes: "; .AutoFormatReplaceFarEastDashes
''' Debug.Print "AutoFormatReplaceFractions: "; .AutoFormatReplaceFractions
''' Debug.Print "AutoFormatReplaceHyperlinks: "; .AutoFormatReplaceHyperlinks
''' Debug.Print "AutoFormatReplaceOrdinals: "; .AutoFormatReplaceOrdinals
''' Debug.Print "AutoFormatReplacePlainTextEmphasis: "; .AutoFormatReplacePlainTextEmphasis
''' Debug.Print "AutoFormatReplaceQuotes: "; .AutoFormatReplaceQuotes
''' Debug.Print "AutoFormatReplaceSymbols: "; .AutoFormatReplaceSymbols
''' End With
Debug.Print "Finished! - time taken was: " & (Timer - StartTime) & " seconds"
End Sub