Word VBA 自动调整表格中指定单元格字体,跨页怎么办
一个Word文档中有多个相同结构的表格,修改指定单元格的字体格式,第一页修改成功了,后面的表格都没有按照指定的字体修改。求大神帮忙看看,该怎么修改、。DimiAsInte...
一个Word文档中有多个相同结构的表格,修改指定单元格的字体格式,第一页修改成功了,后面的表格都没有按照指定的字体修改。求大神帮忙看看,该怎么修改、。
Dim i As Integer, x As Long
i = ActiveDocument.Tables.Count
Application.ScreenUpdating = False
For x = 1 To i
Set oTable = ActiveDocument.Tables(x).Application.Selection
Selection.MoveRight Unit:=wdCharacter, Count:=6
Selection.MoveRight Unit:=wdCharacter, Count:=14, Extend:=wdExtend
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 10
Next
Application.ScreenUpdating = True 展开
Dim i As Integer, x As Long
i = ActiveDocument.Tables.Count
Application.ScreenUpdating = False
For x = 1 To i
Set oTable = ActiveDocument.Tables(x).Application.Selection
Selection.MoveRight Unit:=wdCharacter, Count:=6
Selection.MoveRight Unit:=wdCharacter, Count:=14, Extend:=wdExtend
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 10
Next
Application.ScreenUpdating = True 展开
2个回答
展开全部
没有看到其他信息说明修改内容怎么改,其他的调了一下。你试试:
Sub ttt()
Dim tbl As Table
For Each tbl In ActiveDocument.Tables
Selection.MoveRight Unit:=wdCharacter, Count:=6
Selection.MoveRight Unit:=wdCharacter, Count:=14, Extend:=wdExtend
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 16
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询