一级标题缩进设置为0字符不起作用?office-word-宏
以下宏对一级标题的颜色与字体能起作用,但对首行缩进不起作用。 能否修改一下宏,如何运行宏一级标题的缩进设置为0字符? office word 宏 Sub 一级标题缩进设置为0() With Selection.Find .ClearFormatting '清除格式 .Style = ActiveDocument.Styles(wdStyleHeading1) '查找标题 1 .Wrap = wdFindContinue '找到尾后重头找 .Text = "" .Replacement.ClearFormatting .Replacement.Text = "" .Replacement.Font.Color = vbBlue ‘颜色为蓝色 .Replacement.ParagraphFormat.CharacterUnitFirstLineIndent = 0 '1级标题缩进设置为0 .Execute Replace:=wdReplaceAll '全部替换 End With End Sub
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。
用下面这段宏试试吧! Option Explicit Sub 一级标题缩进设置为0() With Selection.Find .ClearFormatting .Style = ActiveDocument.Styles(wdStyleHeading1) .Forward = True Do .Execute Selection.ParagraphFormat.CharacterUnitFirstLineIndent = 0 Selection.ParagraphFormat.FirstLineIndent = 0 Loop While Len(Selection.Text) > 1 End With End Sub
我不懂宏。其实我经常编辑文档,都是一些格式性的东西。比如,一级标题的设置,二级,三级的设置。但不知道有没有某种方式,可以规范化的来一次性设置这些东东?
答:更改段落格式就行,统一缩进量详情>>
问:怎样用Camtasia Studio v2.0.3来制作媒体
答:这个软件有使用向导的,你新建一个文件,然后照着他的说明一步一步的走下去,就知道怎么用了,这个软件太小了,网上跟本找不到教程的,如果你确实还是不会的话,找个懂电脑...详情>>