PDA

View Full Version : Word 2007 datestamp Macro opens Outlook 2007 setup



mmmreece
10-08-2017, 01:43 PM
I have a word 2007 document which has 2 macros in it. The first is to go to the end of the document on open


Selection.Endkey Unit:=wdstory

The second is


Sub dttimestmp()
'
' dttimestmp Macro
'
'
Selection.TypeParagraph
With Selection.Font
.Name = "Calibri(Body)"
.Bold = True
.Size = "12"
End With
Selection.InsertDateTime DateTimeFormat:="ddd MMMM dd, yyyy H:mm", InsertAsField:=False
With Selection
.Font.Bold = False
.Font.Size = "10"
End With
Selection.TypeParagraph

End Sub


which just enters a datestamp and sets formatting etc...

The problem I'm having in Word 2007 is that when I use the keyboard shortcut CTRL+Shift+A to run the macro Word 2007 automatically starts trying to set up Outlook 2007.

Any ideas why this should be?

And if so, how can I stop it?

SamT
10-09-2017, 04:17 PM
Ctrl+Shift+A opens two macros?

Open the Macro dialog and look at the Options for each macro.

mmmreece
10-10-2017, 02:40 AM
It doesn't open two macros. If I run the keyboard shortcut for my macro (CTRL+Shft+A) it tries to run the Outlook 2007 setup . When I cancel the Outlook 2007 setup the macro runs as normal.

Also, I noticed that when I tried to open visual basic to paste the code into this post that the action of opening visual basic also set off the Outlook 2007 setup procedure

macropod
10-10-2017, 04:02 AM
Evidently, there's something wrong with your Office installation. Try repairing the Office installation (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair).

Unless the 'Reset All' option is greyed-out (because you don't have any custom shortcuts), you can also restore the keyboard shortcuts to their original settings by clicking 'Reset All' at the bottom of the Customize Keyboard dialog box. See under File|Options|Customize Ribbon>Keyboard Shortcuts:Customize.