|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
* 楼主,如果会用宏,可以试试如下代码:(找到数字号码,打印当前页)
- Sub PrintNumPage()
- '??????????????/???????????/??????????/?????
- Dim i&, j$
- With Selection
- Do
- .HomeKey Unit:=wdStory
- j = InputBox("", "Please Input Number! ?????????", "")
- If j = "" Then Exit Sub
- With .Find
- .ClearFormatting
- .Text = j
- .Replacement.Text = ""
- .Forward = True
- .MatchWildcards = True
- Do While .Execute
- i = 1
- With .Parent
- ' .Font.Color = wdColorRed
- .Start = .End
- End With
- Application.PrintOut FileName:="", Range:=wdPrintCurrentPage
- Loop
- End With
- If i = 0 Then
- If MsgBox("Not found! Continue? δ?????????????", vbYesNo + vbCritical) = vbNo Then End
- End If
- Loop
- End With
- End Sub
复制代码 |
|