Lig*_*gmi 5 microsoft-word microsoft-word-2011
我正在Microsoft Word 2011 for mac
使用评论功能编写报告。
是否可以调整评论区的宽度?
那个区域对于我的偏好来说太大了。
在我的“跟踪更改”首选项窗格中,没有可以更改标记窗格宽度的选项。
小智 2
我在用户界面中看不到任何执行此操作的工具,但您可以在代码中执行此操作。和往常一样,步骤比我想要的要多得多。现在,我在底部添加了一些 VBA,以便熟悉这些的人可以插入到您的 Normal 模板中。
对于 VBA,不太确定您不需要启用“开发人员”选项卡,但是......
打开文档并启用要更改的视图(不同视图的宽度可能不同)。
单击Word->工具->宏->Visual Basic 编辑器。
理想情况下,尝试组织 Word 和 VBE 窗口,以便您可以单击两个窗口而无需隐藏其中一个。
如果在VBE中看不到标题为“Immediate Window”的窗口,请使用VBE的View->Immediate Window来显示它
在立即窗口中键入以下内容,或从此处复制/粘贴它,然后在最后按回车/回车键
?activewindow.view.revisionsballoonwidthtype
Run Code Online (Sandbox Code Playgroud)
我想您会在立即窗口中看到值“1”。如果是这样,请将命令更改为以下内容(删除“?”并附加“= 0”)
activewindow.view.revisionsballoonwidthtype=0
Run Code Online (Sandbox Code Playgroud)
并执行它
然后将命令更改为
activewindow.view.revisionsballoonwidth=10
Run Code Online (Sandbox Code Playgroud)
(将你想要的百分比放在我放置“10”的位置)并执行它。
如果您确实想要以磅为单位的宽度,请执行
activewindow.view.revisionsballoonwidthtype=1
Run Code Online (Sandbox Code Playgroud)
然后执行
activewindow.view.revisionsballoonwidth=200
Run Code Online (Sandbox Code Playgroud)
您将宽度以磅为单位而不是“200”
笔记:
FWIW 我会给你等效的 applescript,但我在 Word 2011 词典中看不到等效的属性名称。
或者,您可以将以下代码放入 Normal 模板的新模块中(您可以在 VB 编辑器中执行此操作)。将顶部的宽度值更改为您想要使用的值。然后,使用一个空白文档(即“基于”Normal.dotm”,运行 @@@ 例程。这应该修复 normal.dotm 本身并更改将来的默认行为(我认为!)。
但是,其中还有一个自动打开例程,您可能需要更改现有文档的设置。我不确定你需要这个。如果没有,请删除或重命名 AutoOpen 子文件。如果您确实需要它,并且您的 Normal.dotm 中已经有一个 AutoOpen,您将需要修改现有的例程,然后删除/重命名我的例程。
一路上,我意识到存在一个最小宽度,这让我认为这些值没有“获取”。但例如,在这里设置宽度 5%、10%、15% 具有完全相同的效果,而我需要设置为 21% 或类似的值来增加它。当您检查值时,Word 不会报告它设置的宽度 - 它会报告您尝试设置的宽度。如果您想要“最小值”,我想使用值“1”对于点或百分比可能就足够了。
' set your preferred measurement type and width here.
' NB, there seems to be a minimum anyway, but that may depend on things I have
' not looked at such as screen size and so on.
' The numbers Word reports are the numbers you have set, not the values
' it has actually set the width to.
'Const preferredBalloonWidthType As Integer = WdRevisionsBalloonWidthType.wdBalloonWidthPoints
'Const preferredBalloonWidth As Single = 300
Const preferredBalloonWidthType As Integer = WdRevisionsBalloonWidthType.wdBalloonWidthPercent
Const preferredBalloonWidth As Single = 25
Sub autoopen()
Call changeBalloonSettings
End Sub
Sub changeBalloonSettings()
With ActiveWindow.View
.RevisionsBalloonWidthType = preferredBalloonWidthType
.RevisionsBalloonWidth = preferredBalloonWidth
' debug check
'If .RevisionsBalloonWidthType = WdRevisionsBalloonWidthType.wdBalloonWidthPercent Then
' MsgBox "Percent: " & .RevisionsBalloonWidth
'Else
' MsgBox "Points: " & .RevisionsBalloonWidth
'End If
End With
End Sub
Sub fixupNormaldotm()
' Sets the Normal template to have the settings we would like
' for future documents
' to run this, start word and ensure that a single blank doument,
' based on Normal.dotm, is open (this is by default what you get
' when you start the Word application without e.g. double-clicking
' on a doument in Finder)
Dim d As Word.Document
Dim t As Word.Template
Set t = ActiveDocument.AttachedTemplate
Set d = Documents.Open(t.FullName)
' autoopen should run, so that's all we need. If you removeed
' autoopen, uncomment the following line:
call changeBalloonSettings
d.Save
d.Close
Set d = Nothing
Set t = Nothing
End Sub
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12238 次 |
最近记录: |