在多用户环境中,通常希望设置Word,以便可以轻松将其返回到原始的默认状态。例如,在计算机实验室或培训中心,您可能需要在下一组人员进入并进行自己的配置更改之前将Word设置回其默认值。

不幸的是,您无法抛出任何开关来阻止更改或将所有设置恢复正​​常。 (您可能无论如何都不想阻止更改,特别是在您教人们如何自定义Word的情况下。)最接近的方法是使用/ a命令行开关来启动Word。根据联机帮助系统,此开关使Word“防止加载项和全局模板(包括普通模板)被自动加载”。它还“防止读取或修改设置文件”。如果要使用此开关,只需执行以下步骤:

。使用桌面浏览器(Windows,不是Word),显示包含用于启动Word的快捷方式的文件夹。

。用鼠标右键单击快捷方式图标。这将显示快捷方式的上下文菜单。

。从上下文菜单中选择属性选项。这将显示快捷方式的“属性”对话框。

。单击快捷方式选项卡。 (请参见图1。)

。在“目标”字段的末尾,添加以下内容:/ a(如果“目标”字段中的文本周围有引号,请确保将/ a放在引号之外。此外,请确保在“。”之前有一个空格斜线。)

。单击确定。

请注意,这种方法意味着您永远无法修改Word并拥有更改“权限”。如果您需要从非默认状态开始进行配置,那么最好的方法是使用AutoExec宏将Word的所有可设置选项重置为其默认值。根据使用的Word版本,要使用的确切宏会有所不同。但是,用于创建宏的方法可能非常一致。您需要做的就是遵循以下一般步骤:

。列出您想重置的所有选项(在纸上)。

只需列出出现这些选项的对话框和选项卡。

。启动宏记录器。

。访问在步骤1中列出的每个对话框和选项卡。 。在每个对话框或选项卡上更改一项。 (如果愿意,您可以简单地选中和取消选中复选框。)

。关闭宏录制器。

。编辑宏以进行任何必要的微调更改。 (例如,在本技巧后面的示例宏中,微调涉及到将选项移动并按字母顺序放置。)

。将宏命名为AutoExec。

您应注意,宏的长度可能会很长,具体取决于您访问的对话框和选项卡的数量。例如,以下宏就是这种“设置为默认值”的示例

为在Word 2000中使用而创建的宏(此宏仅出于说明目的;根据您访问对话框的顺序和要包含在宏中的内容,您的宏将有所不同。)

| 注意:

Sub MyOptions()



RecentFiles.Maximum = 9     Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling     Languages(wdEnglishUS).DefaultWritingStyle = "Formal"



With ActiveDocument         .ActiveWritingStyle(wdEnglishUS) = "Formal"

.ClickAndTypeParagraphStyle = "Normal"

.Compatibility(wdAlignTablesRowByRow) = False         .Compatibility(wdAutospaceLikeWW7) = False         .Compatibility(wdConvMailMergeEsc) = False         .Compatibility(wdDontAdjustLineHeightInTable) = True         .Compatibility(wdDontBalanceSingleByteDoubleByteWidth) = True         .Compatibility(wdDontULTrailSpace) = True         .Compatibility(wdDontUseHTMLParagraphAutoSpacing) = False         .Compatibility(wdExactOnTop) = False         .Compatibility(wdExpandShiftReturn) = True         .Compatibility(wdFootnoteLayoutLikeWW8) = False         .Compatibility(wdForgetLastTabAlignment) = False         .Compatibility(wdLayoutRawTableWidth) = False         .Compatibility(wdLayoutTableRowsApart) = False         .Compatibility(wdLeaveBackslashAlone) = True         .Compatibility(wdLineWrapLikeWord6) = False         .Compatibility(wdMWSmallCaps) = False         .Compatibility(wdNoColumnBalance) = False         .Compatibility(wdNoExtraLineSpacing) = False         .Compatibility(wdNoLeading) = False         .Compatibility(wdNoSpaceForUL) = True         .Compatibility(wdNoSpaceRaiseLower) = False         .Compatibility(wdNoTabHangIndent) = False         .Compatibility(wdOrigWordTableRules) = False         .Compatibility(wdPrintBodyTextBeforeHeader) = False         .Compatibility(wdPrintColBlack) = False         .Compatibility(wdShapeLayoutLikeWW8) = False         .Compatibility(wdShowBreaksInFrames) = False         .Compatibility(wdSpacingInWholePoints) = False         .Compatibility(wdSubFontBySize) = False         .Compatibility(wdSuppressBottomSpacing) = True         .Compatibility(wdSuppressSpBfAfterPgBrk) = True         .Compatibility(wdSuppressTopSpacing) = True         .Compatibility(wdSuppressTopSpacingMac5) = False         .Compatibility(wdSwapBordersFacingPages) = False         .Compatibility(wdTransparentMetafiles) = False         .Compatibility(wdTruncateFontHeight) = False         .Compatibility(wdUsePrinterMetrics) = False         .Compatibility(wdWPJustification) = False         .Compatibility(wdWPSpaceWidth) = False         .Compatibility(wdWrapTrailSpaces) = False         .Compatibility(wdWW6BorderRules) = False         .EmbedTrueTypeFonts = False         .OptimizeForWord97 = False         .Password = ""

.PrintFormsData = False         .PrintPostScriptOverText = False         .ReadOnlyRecommended = False         .SaveFormsData = False         .SaveSubsetFonts = False         .ShowGrammaticalErrors = True         .ShowSpellingErrors = True         .WritePassword = ""

End With

With ActiveWindow         .DisplayHorizontalScrollBar = True         .DisplayLeftScrollBar = False         .DisplayRightRuler = False         .DisplayScreenTips = True         .DisplayVerticalScrollBar = True         .StyleAreaWidth = InchesToPoints(0)

With .View             .Draft = False             .FieldShading = wdFieldShadingAlways             .ShowAll = False             .ShowAnimation = True             .ShowBookmarks = True             .ShowDrawings = True             .ShowFieldCodes = False             .ShowHiddenText = False             .ShowHighlight = True             .ShowHyphens = False             .ShowObjectAnchors = False             .ShowParagraphs = False             .ShowPicturePlaceHolders = False             .ShowSpaces = False             .ShowTabs = False             .ShowTextBoundaries = False             .WrapToWindow = False         End With     End With

With Application     .DisplayRecentFiles = True     .DisplayStatusBar = True     .DefaultSaveFormat = ""

.UserName = "User Name"

.UserInitials = "User Initials"

.UserAddress = "User Name" & Chr(13) & Chr(10) & _         "Street Address" & Chr(13) & Chr(10) & "City, State zip"

End With

With CustomDictionaries         .ClearAll         .Add("C:\WINDOWS\Application Data\Microsoft\Proof\CUSTOM.DIC"). _             LanguageSpecific = False         .ActiveCustomDictionary = CustomDictionaries.Item( _             "C:\WINDOWS\Application Data\Microsoft\Proof\CUSTOM.DIC")

End With

With Options         .AllowAccentedUppercase = False         .AllowClickAndTypeMouse = False         .AllowCombinedAuxiliaryForms = True         .AllowCompoundNounProcessing = True         .AllowDragAndDrop = True         .AllowFastSave = False         .AllowPixelUnits = False         .AnimateScreenMovements = False         .ApplyFarEastFontsToAscii = False         .AutoKeyboardSwitching = False         .AutoWordSelection = False         .BackgroundSave = True         .BlueScreen = False         .CheckGrammarAsYouType = False         .CheckGrammarWithSpelling = False         .CheckSpellingAsYouType = False         .ConfirmConversions = False         .CreateBackup = False         .DefaultFilePath(Path:=wdDocumentsPath) = "C:\My Documents"

.DefaultTray = "Use printer settings"

.DeletedTextColor = wdBlue         .DeletedTextMark = wdDeletedTextMarkStrikeThrough         .EnableMisusedWordsDictionary = True         .EnableSound = False         .IgnoreInternetAndFileAddresses = True         .IgnoreMixedDigits = False         .IgnoreUppercase = False         .InsertedTextColor = wdRed         .InsertedTextMark = wdInsertedTextMarkUnderline         .INSKeyForPaste = False         .InterpretHighAnsi = wdHighAnsiIsHighAnsi         .MapPaperSize = True         .MeasurementUnit = wdInches         .OptimizeForWord97byDefault = False         .Overtype = False         .Pagination = True         .PictureEditor = "Microsoft Word"

.PrintBackground = False         .PrintComments = False         .PrintDraft = False         .PrintDrawingObjects = True         .PrintFieldCodes = False         .PrintHiddenText = False         .PrintProperties = False         .PrintReverse = False         .ReplaceSelection = True         .RevisedLinesColor = wdViolet         .RevisedLinesMark = wdRevisedLinesMarkOutsideBorder         .RevisedPropertiesColor = wdGreen         .RevisedPropertiesMark = wdRevisedPropertiesMarkNone         .RTFInClipboard = True         .SaveInterval = 10         .SaveNormalPrompt = True         .SavePropertiesPrompt = True         .SendMailAttach = True         .ShortMenuNames = False         .ShowReadabilityStatistics = False         .SmartCutPaste = True         .SuggestFromMainDictionaryOnly = False         .SuggestSpellingCorrections = True         .TabIndentKey = False         .UpdateFieldsAtPrint = True         .UpdateLinksAtOpen = True         .UpdateLinksAtPrint = True         .VirusProtection = False         .WPDocNavKeys = False         .WPHelp = False     End With

End Sub

如果您想知道如何使用此页面(或_WordTips_网站上的任何其他页面)中描述的宏,我准备了一个包含有用信息的特殊页面。

链接:/ wordribbon-WordTipsMacros [点击此处在新的浏览器标签中打开该特殊页面]。

_WordTips_是您进行经济有效的Microsoft Word培训的来源。

(Microsoft Word是世界上最流行的文字处理软件。)本技巧(642)适用于Microsoft Word 97、2000、2002和2003。