Friday, 15 April 2011

Save and Close Macro for Word

Saw a Tweet recently asking for the functionality to 'Save and Close' from Word, very much like the Microsoft CRM ability.

Nice quick solution - Add a Macro and a button:

First of all, create a macro called SaveandClose with the following logic:

Sub Saveandclose()
'
' Saveandclose Macro
'
'

Application.Quit SaveChanges:=wdPromptToSaveChanges
End Sub





Once the Macro is saved, right click on the Ribbon and choose 'Customize Ribbon':






In the 'Choose Commands From' drop down, choose macros, and find your 'SaveandClose' Macro.
[You may need to create a New Group]

You should then have a Save and Close button on your ribbon.

0 comments:

Post a Comment