1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > WORD VBA 每一页第一段文字

WORD VBA 每一页第一段文字

时间:2022-10-29 11:25:37

相关推荐

WORD VBA  每一页第一段文字

'所有页码pages= ActiveDocument.ActiveWindow.Panes(1).Pages.CountFor i = 1 To pages'下一页,选中ActiveDocument.GoTo(wdGoToPage, wdGoToAbsolute, i).Selectp = Selection.Information(wdActiveEndPageNumber) '当前页码‘所在页第一段选中ActiveDocument.Bookmarks("\page").Range.Paragraphs.Item(1).Range.Select‘字体font_name = ActiveDocument.Bookmarks("\page").Range.Paragraphs.Item(1).Range.Font.Name’大小font_size = ActiveDocument.Bookmarks("\page").Range.Paragraphs.Item(1).Range.Font.Size‘内容txt = ActiveDocument.Bookmarks("\page").Range.Paragraphs.Item(1).Range.TextIf font_name = "黑体" ThenIf font_size = 16 ThenSelection.InsertNewPagei = i + 1If bl = False ThenSelection.MoveLeft Unit:=wdCharacter, Count:=1End IfSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeParagraphSelection.TypeText Text:="*****"End IfEnd If

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。