实现进度条功能
Sub demo()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If oPara.style = "Body text" Then
With oPara.Format
.LineSpacingRule = wdLineSpaceSingle
.SpaceAfter = Word.Application.LinesToPoints(0)
.SpaceBefore = Word.Application.LinesToPoints(0)
End With
End If
Next oPara
End Sub
vba代码将每个带有“正文文本”样式的段落设置为某种格式,但我想添加 进度条,当代码运行时,进度条显示:当前页数/总页数?
Sub demo()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If oPara.style = "Body text" Then
With oPara.Format
.LineSpacingRule = wdLineSpaceSingle
.SpaceAfter = Word.Application.LinesToPoints(0)
.SpaceBefore = Word.Application.LinesToPoints(0)
End With
End If
Next oPara
End Sub
The vba code is set every paragraphs with “ Body Text” style to some format,but I want to add
progress bar ,when the code run ,progress bar shows: current pages /total pages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如蒂莫西所说:
不需要循环,因此不需要进度条。
As Timothy says:
No looping required and, hence, no need for a progress bar.