电脑教程
位置:首页>> 电脑教程>> office教程>> Word 2016的双缩进段落宏?

Word 2016的双缩进段落宏?

  发布时间:2023-03-09 00:29:57 

标签:Word,2016,Word宏,word排版技巧,缩进段落,word教程

Word 2016的双缩进段落宏?Word 2016中的双缩进段落宏会修改段落的缩进,将左右属性都增加半英寸。可以通过使用样式来应用此效果,但是样式可以将缩进设置为特定值。运行宏时,无论当前缩进是什么,新值都将增加半英寸。

这是double_indent宏的代码:

Sub double_indent()

'

' double_indent Macro

' add half inch to both sides of the current paragraph

'

pleft = Selection.ParagraphFormat.LeftIndent + InchesToPoints(0.5)

pright = Selection.ParagraphFormat.RightIndent + InchesToPoints(0.5)

With Selection.ParagraphFormat

.LeftIndent = pleft

.RightIndent = pright

End With

End Sub

该宏采用当前段落的缩进值,并为每个缩进一半。这些值保存在pleftpright变量中。然后修改当前段落的格式,将其重置为这些值。

  • 录制的击键不能伪造此宏。您必须直接对其进行编码。

  • Ctrl + M键盘快捷键的工作方式与double_indent宏相似,但它仅影响段落的左缩进值。

0
投稿

猜你喜欢

手机版 电脑教程 asp之家 www.aspxhome.com