宏.docx
《宏.docx》由会员分享,可在线阅读,更多相关《宏.docx(49页珍藏版)》请在冰点文库上搜索。
宏
Sub表格()
'
'表格Macro
'宏在2006-8-11由FtpDown录制
Application.ScreenUpdating=False
'
Selection.Font.Size=9
Selection.Font.Name="楷体"
Selection.Font.Name="arialnarrow"
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
WithSelection.ParagraphFormat
.SpaceBefore=0
.SpaceBeforeAuto=False
.SpaceAfter=0
.SpaceAfterAuto=False
.LineUnitBefore=0
.LineUnitAfter=0
.WordWrap=True
EndWith
Selection.Cells.VerticalAlignment=wdCellAlignVerticalCenter
Selection.Rows.HeightRule=wdRowHeightAtLeast
Selection.Rows.Height=CentimetersToPoints(0.55)
Selection.Rows.AllowBreakAcrossPages=False
Selection.Rows.HeadingFormat=True
Selection.Cells.VerticalAlignment=wdCellAlignVerticalCenter
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitContent)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
Selection.Tables
(1).AutoFitBehavior(wdAutoFitWindow)
WithSelection.Tables
(1)
.TopPadding=CentimetersToPoints(0)
.BottomPadding=CentimetersToPoints(0)
.LeftPadding=CentimetersToPoints(0.09)
.RightPadding=CentimetersToPoints(0.09)
.Spacing=0
.AllowPageBreaks=True
.AllowAutoFit=True
EndWith
WithSelection.Tables
(1)
With.Shading
.Texture=wdTextureNone
.ForegroundPatternColor=wdColorAutomatic
.BackgroundPatternColor=wdColorAutomatic
EndWith
.Borders(wdBorderLeft).LineStyle=wdLineStyleNone
.Borders(wdBorderRight).LineStyle=wdLineStyleNone
With.Borders(wdBorderTop)
.LineStyle=wdLineStyleSingle
.LineWidth=wdLineWidth100pt
.Color=wdColorAutomatic
EndWith
With.Borders(wdBorderBottom)
.LineStyle=wdLineStyleSingle
.LineWidth=wdLineWidth100pt
.Color=wdColorAutomatic
EndWith
With.Borders(wdBorderHorizontal)
.LineStyle=wdLineStyleDot
.LineWidth=wdLineWidth050pt
.Color=wdColorAutomatic
EndWith
With.Borders(wdBorderVertical)
.LineStyle=wdLineStyleDot
.LineWidth=wdLineWidth050pt
.Color=wdColorAutomatic
EndWith
.Borders(wdBorderDiagonalDown).LineStyle=wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle=wdLineStyleNone
.Borders.Shadow=False
EndWith
WithOptions
.DefaultBorderLineStyle=wdLineStyleDot
.DefaultBorderLineWidth=wdLineWidth050pt
.DefaultBorderColor=wdColorAutomatic
EndWith
EndSub
Sub查找空段()
'
'查找空段Macro
'宏在2006-8-11由FtpDown录制
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
WithSelection.Find
.Text=""
.Replacement.Text=""
.Forward=True
.Wrap=wdFindContinue
.Format=False
.MatchCase=False
.MatchWholeWord=False
.MatchByte=True
.MatchWildcards=False
.MatchSoundsLike=False
.MatchAllWordForms=False
EndWith
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
WithSelection.Find
.Text="^p^p"
.Replacement.Text="^p"
.Forward=True
.Wrap=wdFindContinue
.Format=False
.MatchCase=False
.MatchWholeWord=False
.MatchByte=True
.MatchWildcards=False
.MatchSoundsLike=False
.MatchAllWordForms=False
EndWith
Selection.Find.ExecuteReplace:
=wdReplaceAll
EndSub
Sub标题()
'
'标题Macro
'宏在2006-8-11由FtpDown录制
Application.ScreenUpdating=False
Selection.ClearFormatting
Selection.ClearFormatting
'
Selection.ParagraphFormat.Alignment=wdAlignParagraphCenter
Selection.Font.Name="楷体"
Selection.Font.Size=15
Selection.Font.Name="楷体"
Selection.Font.Size=16
Selection.Font.Size=16
WithSelection.ParagraphFormat
.LeftIndent=CentimetersToPoints(0)
.RightIndent=CentimetersToPoints(0)
.SpaceBefore=2.5
.SpaceBeforeAuto=False
.SpaceAfter=5
.SpaceAfterAuto=False
.LineSpacingRule=wdLineSpaceExactly
.LineSpacing=22
.Alignment=wdAlignParagraphCenter
.WidowControl=False
.KeepWithNext=False
.KeepTogether=False
.PageBreakBefore=False
.NoLineNumber=False
.Hyphenation=True
.FirstLineIndent=CentimetersToPoints(0)
.OutlineLevel=wdOutlineLevel4
.CharacterUnitLeftIndent=0
.CharacterUnitRightIndent=0
.CharacterUnitFirstLineIndent=0
.LineUnitBefore=0.2
.LineUnitAfter=0.5
.AutoAdjustRightIndent=True
.DisableLineHeightGrid=False
.FarEastLineBreakControl=True
.WordWrap=True
.HangingPunctuation=True
.HalfWidthPunctuationOnTopOfLine=False
.AddSpaceBetweenFarEastAndAlpha=True
.AddSpaceBetweenFarEastAndDigit=True
.BaseLineAlignment=wdBaselineAlignAuto
EndWith
WithSelection.ParagraphFormat
.LeftIndent=CentimetersToPoints(0)
.RightIndent=CentimetersToPoints(0)
.SpaceBefore=2.5
.SpaceBeforeAuto=False
.SpaceAfter=5
.SpaceAfterAuto=False
.LineSpacingRule=wdLineSpaceExactly
.LineSpacing=22
.Alignment=wdAlignParagraphCenter
.WidowControl=False
.KeepWithNext=False
.KeepTogether=False
.PageBreakBefore=False
.NoLineNumber=False
.Hyphenation=True
.FirstLineIndent=CentimetersToPoints(0)
.OutlineLevel=wdOutlineLevelBodyText
.CharacterUnitLeftIndent=0
.CharacterUnitRightIndent=0
.CharacterUnitFirstLineIndent=0
.LineUnitBefore=0.2
.LineUnitAfter=0.5
.AutoAdjustRightIndent=True
.DisableLineHeightGrid=False
.FarEastLineBreakControl=True
.WordWrap=True
.HangingPunctuation=True
.HalfWidthPunctuationOnTopOfLine=False
.AddSpaceBetweenFarEastAndAlpha=True
.AddSpaceBetweenFarEastAndDigit=True
.BaseLineAlignment=wdBaselineAlignAuto
EndWith
EndSub
Sub正文()
'
'正文Macro
'宏在2007-06-20由FtpDown录制
'
Application.ScreenUpdating=False
Selection.ClearFormatting
Selection.ClearFormatting
Selection.Font.Size=12
Selection.Font.Name="楷体"
Selection.Font.Name="楷体"
WithSelection.ParagraphFormat
.LeftIndent=CentimetersToPoints(0)
.RightIndent=CentimetersToPoints(0)
.SpaceBefore=0
.SpaceBeforeAuto=False
.SpaceAfter=2.5
.SpaceAfterAuto=False
.LineSpacingRule=wdLineSpaceExactly
.LineSpacing=22
.Alignment=wdAlignParagraphJustify
.WidowControl=False
.KeepWithNext=False
.KeepTogether=False
.PageBreakBefore=False
.NoLineNumber=False
.Hyphenation=True
.FirstLineIndent=CentimetersToPoints(0.35)
.OutlineLevel=wdOutlineLevelBodyText
.CharacterUnitLeftIndent=0
.CharacterUnitRightIndent=0
.CharacterUnitFirstLineIndent=2
.LineUnitBefore=0.2
.LineUnitAfter=0.2
.AutoAdjustRightIndent=True
.DisableLineHeightGrid=False
.FarEastLineBreakControl=True
.WordWrap=True
.HangingPunctuation=True
.HalfWidthPunctuationOnTopOfLine=False
.AddSpaceBetweenFarEastAndAlpha=True
.AddSpaceBetweenFarEastAndDigit=True
.BaseLineAlignment=wdBaselineAlignAuto
EndWith
EndSub
Sub标题1()
'
'Macro1Macro
'宏在2007-09-12由徐超玉录制
Application.ScreenUpdating=False
ActiveWindow.ActivePane.View.Zoom.Percentage=92
'
Selection.ClearFormatting
Selection.ClearFormatting
Selection.Style=ActiveDocument.Styles("标题1")
Selection.ParagraphFormat.Alignment=wdAlignParagraphCenter
Selection.Font.Bold=wdToggle
Selection.Font.Size=12
Selection.Font.Name="楷体"
Selection.Font.Name="楷体"
WithSelection.ParagraphFormat
.LeftIndent=CentimetersToPoints(0)
.RightIndent=CentimetersToPoints(0)
.SpaceBefore=5
.SpaceBeforeAuto=False
.SpaceAfter=5
.SpaceAfterAuto=False
.LineSpacingRule=wdLineSpaceMultiple
.LineSpacing=LinesToPoints(1.25)
.Alignment=wdAlignParagraphJustify
.WidowControl=False
.KeepWithNext=True
.KeepTogether=True
.PageBreakBefore=False
.NoLineNumber=False
.Hyphenation=True
.FirstLineIndent=CentimetersToPoints(0.35)
.OutlineLevel=wdOutlineLevel1
.CharacterUnitLeftIndent=0
.CharacterUnitRightIndent=0
.CharacterUnitFirstLineIndent=2
.LineUnitBefore=0.8
.LineUnitAfter=0.1
.AutoAdjustRightIndent=False
.DisableLineHeightGrid=False
.FarEastLineBreakControl=True
.WordWrap=True
.HangingPunctuation=True
.HalfWidthPunctuationOnTopOfLine=False
.AddSpaceBetweenFarEastAndAlpha=False
.AddSpaceBetweenFarEastAndDigit=False
.BaseLineAlignment=wdBaselineAlignBaseline
Selection.Font.Color=wdColorBlue
Selection.Font.Name="楷体"
Selection.Font.Name="楷体"
Selection.Font.Color=wdColorAutomatic
Selection.Font.Bold=wdToggle
EndWith
EndSub
Sub标题2()
'
'标题2Macro
'宏在2007-06-20由FtpDown录制
'
Application.ScreenUpdating=False
Selection.ClearFormatting
Selection.ClearFormatting
Selection.Font.Size=12
Selection.Font.Name="楷体"
Selection.Font.Name="楷体"
WithSelection.ParagraphFormat
.LeftIndent=CentimetersToPoints(0)
.RightIndent=CentimetersToPoints(0)
.SpaceBefore=2.5
.SpaceBeforeAuto=False
.SpaceAfter=0
.SpaceAfterAuto=False
.LineSpacingRule=wdLineSpaceExactly
.LineSpacing=22
.Alignment=wdAlignParagraphJustify
.WidowControl=False
.KeepWithNext=False
.KeepTogether=False
.PageBreakBefore=False
.NoLineNumber=False
.Hyphenation=Tru