word自动化排版宏

word自动化排版宏

ID:47857832

大小:156.50 KB

页数:7页

时间:2019-11-30

word自动化排版宏_第1页
word自动化排版宏_第2页
word自动化排版宏_第3页
word自动化排版宏_第4页
word自动化排版宏_第5页
资源描述:

《word自动化排版宏》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、[分享]word自动化排版宏[复制链接]自己制作的word自动化排版宏,水平低,很粗糙!还有一些功能未实现,希望高手多多指点,把里面一些多余的代码删减掉,另外再添加一些功能!例如怎样能循环判断最后一页如果只有不到三分之一页的几行时,通过减小行距和字号从而去除最后一页。再者就是大家比较认可的正规排版格式(字号、行距等等)是什么?我想通过做这个东西,我们能有效地提高工作效率,又无需借助其他软件。下面将全部代码奉上!Sub格式设置()''格式设置Macro'宏在2008-9-23由陈凯制作'  Application.ScreenUpdating=False  '更改所有硬回

2、车为软回车  Selection.Find.ClearFormatting  Selection.Find.Replacement.ClearFormatting  WithSelection.Find      .Text="^l"      .Replacement.Text="^p"      .Forward=True      .Wrap=wdFindContinue      .Format=False      .MatchCase=False      .MatchWholeWord=False      .MatchByte=True      .Ma

3、tchWildcards=False      .MatchSoundsLike=False      .MatchAllWordForms=False  EndWith  Selection.Find.ExecuteReplace:=wdReplaceAll  '去除所有空行  DimiAsParagraph,nAsInteger  Application.ScreenUpdating=False  ForEachiInActiveDocument.Paragraphs  IfLen(i.Range)=1Then  i.Range.Delete  n=n+1  End

4、If  Next  Application.ScreenUpdating=True  '去除半角空格  Selection.Find.ClearFormatting  Selection.Find.Replacement.ClearFormatting  WithSelection.Find      .Text=""      .Replacement.Text=""      .Forward=True      .Wrap=wdFindContinue      .Format=False      .MatchCase=False      .MatchWhol

5、eWord=False      .MatchByte=True      .MatchWildcards=False      .MatchSoundsLike=False      .MatchAllWordForms=False  EndWith  Selection.Find.ExecuteReplace:=wdReplaceAll  '去除全角空格  Selection.Find.ClearFormatting  Selection.Find.Replacement.ClearFormatting  WithSelection.Find      .Text=

6、" "      .Replacement.Text=""      .Forward=True      .Wrap=wdFindContinue      .Format=False      .MatchCase=False      .MatchWholeWord=False      .MatchByte=True      .MatchWildcards=False      .MatchSoundsLike=False      .MatchAllWordForms=False  EndWith  Selection.Find.ExecuteReplace

7、:=wdReplaceAll  '替换非标准引号为标准引号  Selection.Find.ClearFormatting  Selection.Find.Replacement.ClearFormatting  WithSelection.Find      .Text="""(*)"""      .Replacement.Text=ChrW(8220)&"1"&ChrW(8221)      .Forward=True      .Wrap=wdFindContinue      .Format=False      .Match

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。