Thread: [Solved] Macro to reset settings
View Single Post
 
Old 08-02-2012, 01:50 PM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Windows XP Office 2007
Competent Performer
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default Macro to reset settings

Several inconsiderate programs, such as Acrobat and some PDF converters, change various Word settings and do not restore them. I am trying to write a macro to restore my settings the way I want them.

Using the recorder, I got this code, which seems to work. I have included the opposite settings as comments in case I change my mind.

Can anyone improve on this?
Code:
Sub MyStdSettings()
 
' Turn picture placeholders off (False)
' ActiveWindow.View.ShowPicturePlaceHolders = True
ActiveWindow.View.ShowPicturePlaceHolders = False
 
' Always show field shading
' ActiveWindow.View.FieldShading = wdFieldShadingNever
ActiveWindow.View.FieldShading = wdFieldShadingAlways
' ActiveWindow.View.FieldShading = wdFieldShadingWhenSelected
 
' Clear all formatting options
Selection.Find.ClearFormatting
 
' Show text boundaries
' ActiveWindow.View.ShowTextBoundaries = False
ActiveWindow.View.ShowTextBoundaries = True
 
End Sub
Then I remembered that I seem to turn tracking on by mistake and wanted to add that to the macro. But no matter whether I use Alt+T or the ribbon, the command the recorder stores in the macro is the same for turning tracking on or off:

ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions

What command can I use to always turn it off?
Reply With Quote