VarWord:=CreateOleObject('word.Basic');// 2. 建立 Word的新文件
VarWord.FileNew;// 3. 设置 Word的基本状态
VarWord.ViewZoom75; //设置显示比例为 75%
VarWord.ViewPage; //改为页面显示方式// 4. 封面
WriteFMToDoc;//以下如何设置行间距,使用什么word命令????

解决方案 »

  1.   

    以下是设置段落的vba代码,自己试试看,行间距应该就是以下属性中的一项    
    With Selection.ParagraphFormat
            .LeftIndent = CentimetersToPoints(0)
            .RightIndent = CentimetersToPoints(0)
            .SpaceBefore = 0
            .SpaceBeforeAuto = False
            .SpaceAfter = 0
            .SpaceAfterAuto = False
            .LineSpacingRule = wdLineSpace1pt5
            .Alignment = wdAlignParagraphJustify
            .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
            .LineUnitAfter = 0
            .AutoAdjustRightIndent = True
            .DisableLineHeightGrid = False
            .FarEastLineBreakControl = True
            .WordWrap = True
            .HangingPunctuation = True
            .HalfWidthPunctuationOnTopOfLine = False
            .AddSpaceBetweenFarEastAndAlpha = True
            .AddSpaceBetweenFarEastAndDigit = True
            .BaseLineAlignment = wdBaselineAlignAuto
        End With
      

  2.   

    应该是LineSpacingRule = wdLineSpace1pt5 (1.5倍)
    wdLineSpaceDouble(2倍)LineSpacingRule = wdLineSpaceExactly
    LineSpacing = 12  (自定义12磅)