Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2012, 01:50 PM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Macro to reset settings Windows XP Macro to reset settings Office 2007
Competent Performer
Macro to reset settings
 
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
  #2  
Old 08-02-2012, 04:12 PM
macropod's Avatar
macropod macropod is offline Macro to reset settings Windows 7 64bit Macro to reset settings Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jennifer,

I've never known an Addin to change any of those settings, though I accept YMMV.

To disable track changes, use:
ActiveDocument.TrackRevisions = False

What I've found you're more likely to end up with is a bunch of custom Styles being added to a document created via a PDF/OCR conversion. You could use a macro to delete all Styles that aren't found in, say, Normal.dot, but that would result in any content in the unwanted custom Styles being converted to Normal Style with the consequential loss of formatting.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset Animations debraholloway PowerPoint 0 07-14-2011 09:22 PM
Reset start page? markg2 Excel 2 04-18-2010 06:54 AM
How To Reset The Defaults Settings Mixman77 Office 0 01-16-2010 02:42 PM
Macro to reset settings Need to reset default document Danny Jo Word 1 07-06-2009 10:24 AM
Reset on error kiwichico Word VBA 0 09-23-2008 08:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft