岩土工程学报word排版VBA编程

这段VBA代码用于自动调整Word文档中各种样式,包括标题、摘要、关键词、英文题目、英文摘要等的字体大小、样式、对齐方式、行间距,以符合岩土工程学报的论文格式要求。
摘要由CSDN通过智能技术生成

 Sub JRMGE_Change()

  ' 岩土工程学报论文格式修改
  
    Dim doc As Document
    Set doc = ActiveDocument
    Dim lineHeight As Single
    
             
    ' 修改标题样式
    With doc.Styles("标题")
        .Font.Size = 22
        .Font.Bold = True
        .Font.Name = "黑体"
        .Font.Name = "Times New Roman"
                
        lineHeight = .Font.Size * 1.2
        .ParagraphFormat.Alignment = wdAlignParagraphCenter
        .ParagraphFormat.SpaceBefore = lineHeight * 3
        .ParagraphFormat.SpaceAfter = lineHeight
        .ParagraphFormat.LineSpacingRule = wdLineSpaceExactly
        .ParagraphFormat.LineSpacing = 18
    End With
    
    ' 修改摘要内容样式
    With doc.Styles("摘要内容")
        .Font.Size = 9
        .Font.Bold = False
        .Font.Name = "宋体"
        .Font.Name = "Times New Roman"
        
        .ParagraphFormat.Alignment = wdAlignParagraphJustify
        .ParagraphFormat.LeftIndent = CentimetersToPoints(0.84)
        .ParagraphFormat.RightIndent = Centim

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值