C
charlie6067
1. First Method:
I have written several macros to insert autotext that has some words
bolded, some not, in the paragraphs. The macros are triggered from a
custom drop-down tool bar menu I had made. When this method runs, no
bolding displays when the autotext inserts via the macro.
2. Second method:
If I manually insert the autotext from the Tools menu, the text inserts
with appropriate words formatted in bold.
Why does the second method give the desired results and the first
doesn't?
Here's the code from method one at the end of this message. I recorded
a keystroke macro so maybe there's extra code in it that's messing up
the desired result? Any help will be appreciated.
Thanks,
Charlie
charlie6067
Sub VOL_DEN()
'
' InsertCoverage Macro
' Macro recorded 07/28/06 by Charlie Johnson
'
PasswordOff
Application.DisplayAutoCompleteTips = False
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("11. VOLUNTARY
DENTAL"). _
Insert Where:=Selection.Range
PasswordOn
End Sub
I have written several macros to insert autotext that has some words
bolded, some not, in the paragraphs. The macros are triggered from a
custom drop-down tool bar menu I had made. When this method runs, no
bolding displays when the autotext inserts via the macro.
2. Second method:
If I manually insert the autotext from the Tools menu, the text inserts
with appropriate words formatted in bold.
Why does the second method give the desired results and the first
doesn't?
Here's the code from method one at the end of this message. I recorded
a keystroke macro so maybe there's extra code in it that's messing up
the desired result? Any help will be appreciated.
Thanks,
Charlie
charlie6067
Sub VOL_DEN()
'
' InsertCoverage Macro
' Macro recorded 07/28/06 by Charlie Johnson
'
PasswordOff
Application.DisplayAutoCompleteTips = False
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("11. VOLUNTARY
DENTAL"). _
Insert Where:=Selection.Range
PasswordOn
End Sub