Quote:
Originally Posted by Nick Piazza
I have setup my document to use black headings. However, when I use the
References/Insert Caption option to caption a figure I've inserted, The
caption text defaults to blue, and I have to manually change it to black
after entering the caption. How can I setup the default caption color to
black?
Thanks,
Nick Piazza
|
Hi, Nick,
You have 2 ways to alter the default caption style in your document, as follows:
1. You can create a template by modifying the caption style as you like.
Then save it and open it next time you need to use.
Or
2. Use VBA codes to create a new module and paste the bellowing codes the
Sub SetCaptionStyle()
Dim objDoc As Document
Set objDoc = ActiveDocument
objDoc.FormattingShowFilter = wdShowFilterFormattingInUse
objDoc.StyleSortMethod = wdStyleSortByName
With objDoc.Styles("Caption").Font
.Name = "Times New Roman"
.Size = 14
.Bold = True
.Italic = False
.Underline = wdUnderlineNone
.ColorIndex = wdBrightGreen
.Engrave = False
.Superscript = False
.Subscript = False
.Scaling = 100
.Kerning = 0
.Animation = wdAnimationNone
.Ligatures = wdLigaturesNone
.NumberSpacing = wdNumberSpacingDefault
.NumberForm = wdNumberFormDefault
.StylisticSet = wdStylisticSetDefault
.ContextualAlternates = 0
End With
With objDoc.Styles("Caption")
.AutomaticallyUpdate = False
.BaseStyle = "Normal"
.NextParagraphStyle = "Normal"
End With
End Sub
Note this macro sets your caption in bright green. You can also change the constants, such as the font name, size, etc.
Then every time you run this macro, it shall set all captions in your document as required.
For more detailed information, you can refer to this article:
https://www.datanumen.com/blogs/2-wa...word-document/
Hope that helps!
Adelean