一级标题缩进设置为0字符不起作用?off
Sub 前123级标题() '测试结果 1 代码重复运行1次才能调整好。
Selection。HomeKey wdStory '光标移到最前面。
Dim p As Paragraph
For Each p In ActiveDocument。 Paragraphs
If p。Style = "标题 1" Then p。LeftIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。 Style = "标题 1" Then p。RightIndent = 0 '...全部
Sub 前123级标题() '测试结果 1 代码重复运行1次才能调整好。
Selection。HomeKey wdStory '光标移到最前面。
Dim p As Paragraph
For Each p In ActiveDocument。
Paragraphs
If p。Style = "标题 1" Then p。LeftIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。
Style = "标题 1" Then p。RightIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。Style = "标题 1" Then p。
FirstLineIndent = CentimetersToPoints(0) '首行缩进0cm(只对单位是cm的缩进有效)
If p。Style = "标题 1" Then p。
CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
If p。Style = "标题 2" Then p。
LeftIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。Style = "标题 2" Then p。RightIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。
Style = "标题 2" Then p。FirstLineIndent = CentimetersToPoints(0) '首行缩进0cm(只对单位是cm的缩进有效)
If p。
Style = "标题 2" Then p。CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
If p。
Style = "标题 3" Then p。LeftIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。Style = "标题 3" Then p。
RightIndent = 0 '段落的绝对左缩进量(以磅为单位)
If p。Style = "标题 3" Then p。FirstLineIndent = CentimetersToPoints(0) ' '首行缩进0cm
If p。
Style = "标题 3" Then p。CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
If p。
Style = "标题 1" Then p。FirstLineIndent = CentimetersToPoints(0) '首行缩进0cm(只对单位是cm的缩进有效)
If p。
Style = "标题 1" Then p。CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
If p。
Style = "标题 2" Then p。FirstLineIndent = CentimetersToPoints(0) '首行缩进0cm(只对单位是cm的缩进有效)
If p。
Style = "标题 2" Then p。CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
If p。
Style = "标题 3" Then p。FirstLineIndent = CentimetersToPoints(0) ' '首行缩进0cm
If p。Style = "标题 3" Then p。
CharacterUnitFirstLineIndent = 0 '首行缩进0磅(只对单位是磅的缩进有效)
Next
Selection。Move
' If p。
Style = "标题 1" Then p。Range。Font。Color = vbBlack 'blue
' If p。Style = "标题 1" Then p。
Format。LineSpacingRule = wdLineSpaceExactly '行距固定值
' If p。Style = "标题 1" Then p。Format。LineSpacing = 20 '行距固定值= 20
' If p。
Style = "标题 1" Then p。Format。SpaceBefore = 0 '段前距为0
' If p。Style = "标题 1" Then p。
Format。SpaceAfter = 0 '段后距为0
' If p。Style = "标题 1" Then p。LeftIndent = 0 '段落的绝对左缩进量(以磅为单位)
' If p。
Style = "标题 1" Then p。RightIndent = 0 '段落的绝对右缩进量(以磅为单位)
' If p。Style = "标题 1" Then p。
Range。Bold = True '加粗
' If p。Style = "标题 1" Then p。CharacterUnitFirstLineIndent = InchesToPoints(0) '度量单位从英寸转换为磅Points
Selection。
HomeKey wdStory '光标移到最前面。' D图片居中
End Sub。收起