Sub 无格式粘贴(
Selection.PasteAndFormat (wdFormatPlainText
End Sub
Sub 增强型图元文件(
Selection.Collapse Direction:=wdCollapseStart
Selection.Range.PasteSpecial DataType:=wdPasteEnhanceMetafile
End Sub
Sub 显示比例正常(
On Error Resume Next
ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End Sub
Sub 显示文字宽度(
'
' 显示文字宽度 Macro
' 宏在 2011/9/29 由 AIRDAN 录制
'
ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitTextFit
End Sub
Sub 当前打印机(
On Error Resume Next
MsgBox (Application.ActivePrinter
End Sub
Sub A4纸(
On Error Resume Next
ActiveWindow.ActivePane.DisplayRulers = True
With ActiveDocument.PageSetup
.TextColumns.SetCount NumColumns:=1
.TextColumns.EvenlySpaced = True
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2.54
.BottomMargin = CentimetersToPoints(2.54
.LeftMargin = CentimetersToPoints(3.17
.RightMargin = CentimetersToPoints(3.17
.HeaderDistance = CentimetersToPoints(1.5
.FooterDistance = CentimetersToPoints(1.5
.PageWidth = CentimetersToPoints(21
.PageHeight = CentimetersToPoints(29.7
StatusBar = Application.ActivePrinter
End With
ActiveWindow.ActivePane.View.Zoom.Percentage = 100
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
End Sub
Sub 试卷纸39×27_8开(
On Error Resume Next
ActiveWindow.ActivePane.DisplayRulers = True
With ActiveDocument.PageSetup
.Orientation = wdOrientLandscape
.PageWidth = CentimetersToPoints(39
.PageHeight = CentimetersToPoints(27
.TextColumns.SetCount NumColumns:=2
.TextColumns.Spacing = CentimetersToPoints(2
.TopMargin = CentimetersToPoints(2
.BottomMargin = CentimetersToPoints(2
replaceall().LeftMargin = CentimetersToPoints(2.5
.RightMargin = CentimetersToPoints(2.5
.HeaderDistance = CentimetersToPoints(1.5
.FooterDistance = CentimetersToPoints(1.5
StatusBar = Application.ActivePrinter
End With
ActiveWindow.ActivePane.View.Zoom.Percentage = 100
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
End Sub
Sub 半张试卷_16开(
On Error Resume Next
ActiveWindow.ActivePane.DisplayRulers = True
With ActiveDocument.PageSetup
.TextColumns.SetCount NumColumns:=1
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2
.BottomMargin = CentimetersToPoints(2
.LeftMargin = CentimetersToPoints(2.5
.RightMargin = CentimetersToPoints(2.5
.HeaderDistance = CentimetersToPoints(1.5
.FooterDistance = CentimetersToPoints(1.5
.PageWidth = CentimetersToPoints(19.5
.PageHeight = CentimetersToPoints(27
StatusBar = Application.ActivePrinter
End With
ActiveWindow.ActivePane.View.Zoom.Percentage = 100
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
End Sub
Sub 去除多余空格(
On Error Resume Next
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchByte = True
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " "
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchByte = True
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
End Sub
Sub 去除多余回车符(
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^l"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchByte = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论