- ·上一篇:怎样在word中插入英文四线格
- ·下一篇:word如何升序
WORD如何批量一行字换一种颜色
2024-07-03 10:20:26
1.WORD怎么批量一行字换一种颜色
写了个VBA宏(你随便录制一个宏,然后替换为以下的代码运行即可):
sub test_by_zzllrr()
dim pg,ln,lne,i
with activedocument.characters(selection.storylength)
pg # .information(wdactiveendpagenumber)
ln # .information()
end with
with selection
.homekey wdstory
i # 0
do until .information(wdactiveendpagenumber) # pg and .information() # ln
i # (i + 1) mod 4
.movedown wdline, 1
.homekey wdline
.endkey wdline, wdextend
.font.colorindex # i+ 1
loop
end with
end sub
'注意: 我手机打不了等号, 要把上面所有#号替换为等号