首页 > 代码库 > word 批量修改表格格式
word 批量修改表格格式
For i = 1 To ActiveDocument.Tables.Count ActiveDocument.Tables(i).Cell(1, 1).Select With Selection .SelectRow .Font.Bold = True .Shading.BackgroundPatternColor = -603923969End With ActiveDocument.Tables(i).Range.Font.Size = 10 Next
宏内容:修改表格第一行字体为粗体,背景为浅灰色
For i = 1 To ActiveDocument.Tables.Count ActiveDocument.Tables(i).Style = "my"Next
宏内容:修改文档中所有的表格,使其表格样式为“my”的样式格式。
For i = 1 To ActiveDocument.Tables.Count ActiveDocument.Tables(i).Style = "my"With With ActiveDocument.Tables(i).Range.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .LineSpacingRule = wdLineSpace1pt5 .Alignment = wdAlignParagraphCenter .WidowControl = False .KeepWithNext = False .KeepTogether = False .PageBreakBefore = False .NoLineNumber = False .Hyphenation = True .FirstLineIndent = CentimetersToPoints(0) .OutlineLevel = wdOutlineLevelBodyText .CharacterUnitLeftIndent = 0 .CharacterUnitRightIndent = 0 .CharacterUnitFirstLineIndent = 0 .MirrorIndents = False .TextboxTightWrap = wdTightNone .CollapsedByDefault = False .AutoAdjustRightIndent = True .DisableLineHeightGrid = False .FarEastLineBreakControl = True .WordWrap = True .HangingPunctuation = True .HalfWidthPunctuationOnTopOfLine = False .AddSpaceBetweenFarEastAndAlpha = True .AddSpaceBetweenFarEastAndDigit = True .BaseLineAlignment = wdBaselineAlignAuto End With Next
宏内容:修改表格段落格式
word 批量修改表格格式
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。