View Single Post
 
Old 03-28-2019, 06:30 AM
Ulodesk Ulodesk is offline Windows 7 64bit Office 2013
Word 2013 Expert Cert
 
Join Date: Sep 2009
Location: Virginia
Posts: 872
Ulodesk is on a distinguished road
Default Just one macro not working

In my (W7) Normal.dotm, in Module1 (the only module), this one macro of the 20-some I have, stopped working from the keyboard shortcut months ago, and I'm finally getting around to posting here. It works fine if I run it from macros dialogue. All my other macro shortcuts work. The shortcut is the same I have used for ten years, [Ctrl+Shift+?]. The keyboard and those keys in particular work fine as well. Any ideas?

Code:
Sub InsertDate()
'
' InsertDate Macro
'
'
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "DATE  \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Fields.Unlink
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeParagraph
    Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
Reply With Quote