I'm writing a report with Microsoft Word 2011 for mac
using Comment functionality.
Is it possible to resize the width of comment area ?
That area is too large for my preference.
Update
In my "Track Changes" pref pane, there is no option which enable to change markup pane's width.
Answer
I cannot see any facility for doing this in the User Interface, but you can do it in code. As usual, there are a lot more steps than I'd want. At the bottom I have now added some VBA for insertion in your Normal template for those who are familiar with that.
For VBA, not quite sure that you do not need to enable the Developer tab, but...
Open your document and enable the View that you want to change (the width can be different for different views).
Click Word->Tools->Macro->Visual Basic Editor .
Ideally, try to organise the Word and VBE windows so you can click in both without hiding one or the other.
If you cannot see a window titled "Immediate Window" in the VBE, use VBE's View->Immediate Window to display it
Type the following into the immediate Window, or copy/paste it from here, and press return/enter at the end
?activewindow.view.revisionsballoonwidthtype
I think you will see the value "1" displayed in the Immediate Window. If so, change the command to the following (delete the "?" and append "=0")
activewindow.view.revisionsballoonwidthtype=0
and execute it
Then change the command to
activewindow.view.revisionsballoonwidth=10
(put the percentage you want where I have put "10") and execute that.
If you actually want a width in points, execute
activewindow.view.revisionsballoonwidthtype=1
then execute
activewindow.view.revisionsballoonwidth=200
where you put the width in points instead of "200"
Notes:
- when I first tried changing the width value, it didn't work. I seemed to have to modify the revisionsballoonwidthtype first, then my change would "take" But perhaps I did something wrong along the way.
- you may need to prefix "ActiveWindow" by "ActiveDocument." (without the quotation marks) to get this to work.
FWIW I would give you the equivalent applescript, but I can't see the equivalent property names in the Dictionary for Word 2011.
Alternatively, you can put the following code in a new Module in your Normal template (you can do that in the VB Editor). Change the width values att he top to the ones you want to use. Then, with a blank document (i.e. "based on" Normal.dotm", run the @@@ routine. This should fix normal.dotm itself and change the default behaviour in future (I think!).
However, there is also an AutoOpen routine in there which you may need to change the settings for existing documents. I am not sure you need this. If not, delete or rename the AutoOpen sub. If you do need it, and you already have an AutoOpen in your Normal.dotm, you will need to modify your existing routine, then remove/rename mine.
Along the way, I realised that there is a minimum width, which is what folled me into thinking that the values were not "taking". But for example, setting a width of 5%, 10%, 15% here has exactly the same effect, and I need to go to 21% or some such to increase it. Word does not report the width it has set when you inspect the values - it reports the widths you tried to set. If you want "the minimum", I suppose using the value "1" may be enough for either points or percent.
' 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
Comments
Post a Comment