1个回答
展开全部
Sub PageLine()
nPage = InputBox(Chr(13) & "输入要查看的页数。", "文本的页数", 13)
nLine = InputBox(Chr(13) & "输入要查看的行数。", "查看的行数", 7)
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=nPage
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Name:=nLine - 1
Selection.Extend
Selection.EndKey Unit:=wdLine
Selection.EscapeKey
MsgBox Selection.Range
End Sub
nPage = InputBox(Chr(13) & "输入要查看的页数。", "文本的页数", 13)
nLine = InputBox(Chr(13) & "输入要查看的行数。", "查看的行数", 7)
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=nPage
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Name:=nLine - 1
Selection.Extend
Selection.EndKey Unit:=wdLine
Selection.EscapeKey
MsgBox Selection.Range
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询