爱问知识人 爱问教育 医院库

Vba全面修改Word段落属性有效代码

首页

Vba全面修改Word段落属性有效代码


        

提交回答
好评回答
  • 2024-04-18 14:30:00
      下面的WAPP是事先定义的word文档工程变量。以下代码为通过VBA代码修改Word段落的缩进、段落间距、行距、分页等。//段落格式设定WApp。Selection。ParagraphFormat。LeftIndent = WApp。CentimetersToPoints(float。
      Parse("0"));//左缩进WApp。Selection。ParagraphFormat。RightIndent = WApp。CentimetersToPoints(float。Parse("0"));//右缩进WApp。Selection。
      ParagraphFormat。SpaceBefore =float。Parse("0");//段前间距WApp。Selection。ParagraphFormat。SpaceBeforeAuto =0;//WApp。Selection。ParagraphFormat。
      SpaceAfter = float。Parse("0");//段后间距WApp。Selection。ParagraphFormat。SpaceAfterAuto = 0;//WApp。Selection。ParagraphFormat。LineSpacingRule = Microsoft。
      Office。Interop。Word。WdLineSpacing。wdLineSpaceSingle;//单倍行距WApp。Selection。ParagraphFormat。Alignment = Microsoft。Office。Interop。
      Word。WdParagraphAlignment。wdAlignParagraphJustify;//段落2端对齐WApp。Selection。ParagraphFormat。WidowControl = 0;//孤行控制WApp。Selection。
      ParagraphFormat。KeepWithNext = 0;//与下段同页WApp。Selection。ParagraphFormat。KeepTogether = 0;//段中不分页WApp。Selection。ParagraphFormat。
      PageBreakBefore = 0;//段前分页WApp。Selection。ParagraphFormat。NoLineNumber = 0;//取消行号WApp。Selection。ParagraphFormat。Hyphenation = 1;//取消段字WApp。
      Selection。ParagraphFormat。FirstLineIndent = WApp。CentimetersToPoints(float。Parse("0"));//首行缩进WApp。Selection。ParagraphFormat。
      OutlineLevel = Microsoft。Office。Interop。Word。WdOutlineLevel。wdOutlineLevelBodyText;WApp。Selection。ParagraphFormat。CharacterUnitLeftIndent = float。
      Parse("0");WApp。Selection。ParagraphFormat。CharacterUnitRightIndent = float。Parse("0");WApp。Selection。ParagraphFormat。CharacterUnitFirstLineIndent = float。
      Parse("0");WApp。Selection。ParagraphFormat。LineUnitBefore = float。Parse("0");WApp。Selection。ParagraphFormat。LineUnitAfter = float。
      Parse("0");WApp。Selection。ParagraphFormat。AutoAdjustRightIndent = 1;WApp。Selection。ParagraphFormat。DisableLineHeightGrid =0;WApp。
      Selection。ParagraphFormat。FarEastLineBreakControl =1;WApp。Selection。ParagraphFormat。WordWrap = 1;WApp。Selection。ParagraphFormat。
      HangingPunctuation = 1;WApp。Selection。ParagraphFormat。HalfWidthPunctuationOnTopOfLine = 0;WApp。Selection。ParagraphFormat。
      AddSpaceBetweenFarEastAndAlpha = 1;WApp。Selection。ParagraphFormat。AddSpaceBetweenFarEastAndDigit = 1;WApp。Selection。ParagraphFormat。
      BaseLineAlignment = Microsoft。Office。Interop。Word。WdBaselineAlignment。wdBaselineAlignAuto;。

    胡***

    2024-04-18 14:30:00

相关推荐

正在加载...
最新资料 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):