Attribute VB_Name = "Main" Sub Autoexec() ' ' Section for iManage Object Instantiation ' ' Set the iManage COM AddIn for Word Dim objCOMAddIn As Object Set objCOMAddIn = _ Application.COMAddIns("iManO2K.AddinForWord2000").Object ' Instantiate the COM object. Set iManEvtObj = New iManEvt iManEvtObj.InstIManCom objCOMAddIn ' ' Section For TrayPrint Object Instantiation ' and initialization. ' Set oEvt = New WrdTrigg Set oEvt.WrdTrig = Word.Application TrayPrint.SetTrays End Sub Sub PasteSpecialUnformattedText() 'Paste Special Unformatted Text Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:= _ wdInLine, DisplayAsIcon:=False End Sub Sub Crosswords() MsgBox ("Currently not available") End Sub Sub DateCode() Load DlgDateCode DlgDateCode.Show End Sub Sub ZipCode() Load DlgZipCode DlgZipCode.Show End Sub Sub SectionBreakNextPage() Selection.InsertBreak Type:=wdSectionBreakNextPage End Sub Sub PaperTrayUpper() With ActiveDocument.PageSetup .FirstPageTray = wdPrinterUpperBin .OtherPagesTray = wdPrinterUpperBin End With End Sub Sub PaperTrayLower() With ActiveDocument.PageSetup .FirstPageTray = wdPrinterLowerBin .OtherPagesTray = wdPrinterLowerBin End With End Sub Sub PrintCurrentPage() ActiveDocument.PrintOut Range:=wdPrintCurrentPage End Sub Public Sub FileSavex() Dim vResult As Variant If ActiveDocument.Revisions.Count > 0 Or ActiveDocument.TrackRevisions = True Then vResult = MsgBox("This document has changes tracked changes or the Track Changes feature is turned on. Do you want to accept changes and turn off the feature?", vbYesNoCancel, "W A R N I N G !") If vResult = vbYes Then ActiveDocument.Revisions.AcceptAll ActiveDocument.TrackRevisions = False ActiveDocument.Save End If If vResult = vbNo Then ActiveDocument.Save End If End If End Sub 'Public Sub FileSaveAsx() ' Dim vResult As Variant ' If ActiveDocument.Revisions.Count > 0 Or ActiveDocument.TrackRevisions = True Then ' vResult = MsgBox("This document has changes tracked changes or the Track Changes feature is turned on. Do you want to accept changes and turn off the feature?", vbYesNoCancel, "W A R N I N G !") ' If vResult = vbYes Then ' ActiveDocument.Revisions.AcceptAll ' ActiveDocument.TrackRevisions = False ' Word.Dialogs(wdDialogFileSaveAs).Show ' End If ' If vResult = vbNo Then ' Word.Dialogs(wdDialogFileSaveAs).Show ' End If ' End If 'End Sub Public Sub QFinder() Shell "D:\Corel\Office7\Shared\QFinder7\QFINDER.EXE X:\Dox" End Sub Sub FirmStyles() On Error Resume Next With ActiveDocument .UpdateStylesOnOpen = False .AttachedTemplate = "Normal" End With Dim NormalPath As String Dim aTmplt As Template Set aTmplt = ActiveDocument.AttachedTemplate NormalPath = aTmplt.FullName Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Body Text", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Body Text 2", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 1", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 2", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 3", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 4", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 5", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 6", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 7", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 8", Object:=wdOrganizerObjectStyles Application.OrganizerCopy Source:= _ "S:\WordTricks\Word_Templates\Normal.dot", Destination:= _ NormalPath _ , Name:="Heading 9", Object:=wdOrganizerObjectStyles End Sub Sub FirmSettings() On Error Resume Next If MsgBox("This will set Word to the Firm Standard Settings." & vbCrLf & vbCrLf & _ "Do you want to continue?", vbYesNo, "Confirm to Continue") = vbNo Then Exit Sub End If Kill "C:\Documents and Settings\All Users\Start Menu\WORDPERFECT 9.LNK" Shell "REGEDIT /S S:\CACHE.REG" FileCopy "D:\COREL\WP2000\PROGRAMS\WPWIN9.EXE", "D:\COREL\WP2000\PROGRAMS\WPWIN9.EXO" Kill "C:\WINNT\PROFILES\ALL USERS\START MENU\WORDPERFECT 9.LNK" If Len(Dir("D:\Backup\", vbDirectory)) > 0 Then Options.DefaultFilePath(Path:=wdAutoRecoverPath) = "D:\Backup\" End If Application.DisplayStatusBar = True Application.ShowWindowsInTaskbar = True Application.ShowStartupDialog = False With ActiveWindow .DisplayHorizontalScrollBar = True .DisplayVerticalScrollBar = True .DisplayLeftScrollBar = False .StyleAreaWidth = InchesToPoints(1) .DisplayVerticalRuler = False .DisplayRightRuler = False .DisplayScreenTips = True With .View .ShowAnimation = True .Draft = False .WrapToWindow = False .ShowPicturePlaceHolders = False .ShowFieldCodes = False .ShowBookmarks = False .FieldShading = wdFieldShadingAlways .ShowTabs = False .ShowSpaces = False .ShowParagraphs = False .ShowHyphens = False .ShowHiddenText = False .ShowAll = False .ShowDrawings = True .ShowObjectAnchors = False .ShowTextBoundaries = False .ShowHighlight = True .DisplayPageBoundaries = True .DisplaySmartTags = True End With End With With Options .Pagination = True .WPHelp = False .WPDocNavKeys = False .ShortMenuNames = False .RTFInClipboard = True .BlueScreen = False .EnableSound = False .ConfirmConversions = True .UpdateLinksAtOpen = True .SendMailAttach = True .MeasurementUnit = wdInches .AllowPixelUnits = False .AnimateScreenMovements = True .VirusProtection = False .ApplyFarEastFontsToAscii = False .InterpretHighAnsi = wdHighAnsiIsHighAnsi .BackgroundOpen = False .AutoCreateNewDrawings = False End With Application.DisplayRecentFiles = False RecentFiles.Maximum = 0 With Options .ReplaceSelection = True .AllowDragAndDrop = True .AutoWordSelection = False .INSKeyForPaste = False .PasteSmartCutPaste = False .AllowAccentedUppercase = False .PictureEditor = "Microsoft Word" .TabIndentKey = True .Overtype = False .AllowClickAndTypeMouse = False .CtrlClickHyperlinkToOpen = True .AutoKeyboardSwitching = False .PictureWrapType = wdWrapMergeInline .DisplayPasteOptions = True .PromptUpdateStyle = False .FormatScanning = False .ShowFormatError = False .SmartParaSelection = False End With With Options .UpdateFieldsAtPrint = True .UpdateLinksAtPrint = True .DefaultTray = "Use printer settings" .PrintBackground = True .PrintProperties = False .PrintFieldCodes = False .PrintComments = False .PrintHiddenText = False .PrintDrawingObjects = True .PrintDraft = False .PrintReverse = False .MapPaperSize = True .PrintOddPagesInAscendingOrder = False .PrintEvenPagesInAscendingOrder = False End With With Options .LocalNetworkFile = False .AllowFastSave = False .BackgroundSave = True .CreateBackup = True .SavePropertiesPrompt = False .SaveInterval = 5 .SaveNormalPrompt = False .DisableFeaturesbyDefault = False End With Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling With Options .WarnBeforeSavingPrintingSendingMarkup = True .StoreRSIDOnSave = True End With With Options .CheckSpellingAsYouType = True .CheckGrammarAsYouType = False .SuggestSpellingCorrections = True .SuggestFromMainDictionaryOnly = False .CheckGrammarWithSpelling = False .ShowReadabilityStatistics = False .IgnoreUppercase = False .IgnoreMixedDigits = True .IgnoreInternetAndFileAddresses = True .AllowCombinedAuxiliaryForms = True .EnableMisusedWordsDictionary = True .AllowCompoundNounProcessing = True .UseGermanSpellingReform = True End With With Options .InsertedTextMark = wdInsertedTextMarkDoubleUnderline .InsertedTextColor = wdBlack .DeletedTextMark = wdDeletedTextMarkStrikeThrough .DeletedTextColor = wdBlack .RevisedPropertiesMark = wdRevisedPropertiesMarkColorOnly .RevisedPropertiesColor = wdBlue .RevisedLinesMark = wdRevisedLinesMarkLeftBorder .RevisedLinesColor = wdRed End With Dim aTemplate As Template Set aTemplate = Application.Templates("Normal.Dot") aTemplate.OpenAsDocument With ActiveDocument .Compatibility(wdNoTabHangIndent) = False .Compatibility(wdNoSpaceRaiseLower) = False .Compatibility(wdPrintColBlack) = False .Compatibility(wdWrapTrailSpaces) = False .Compatibility(wdNoColumnBalance) = False .Compatibility(wdConvMailMergeEsc) = False .Compatibility(wdSuppressSpBfAfterPgBrk) = False .Compatibility(wdSuppressTopSpacing) = False .Compatibility(wdOrigWordTableRules) = False .Compatibility(wdTransparentMetafiles) = False .Compatibility(wdShowBreaksInFrames) = False .Compatibility(wdSwapBordersFacingPages) = False .Compatibility(wdLeaveBackslashAlone) = True .Compatibility(wdExpandShiftReturn) = True .Compatibility(wdDontULTrailSpace) = True .Compatibility(wdDontBalanceSingleByteDoubleByteWidth) = True .Compatibility(wdSuppressTopSpacingMac5) = False .Compatibility(wdSpacingInWholePoints) = False .Compatibility(wdPrintBodyTextBeforeHeader) = False .Compatibility(wdNoLeading) = False .Compatibility(wdNoSpaceForUL) = True .Compatibility(wdMWSmallCaps) = False .Compatibility(wdNoExtraLineSpacing) = False .Compatibility(wdTruncateFontHeight) = False .Compatibility(wdUsePrinterMetrics) = False .Compatibility(wdSubFontBySize) = False .Compatibility(wdWW6BorderRules) = False .Compatibility(wdExactOnTop) = False .Compatibility(wdSuppressBottomSpacing) = False .Compatibility(wdWPSpaceWidth) = False .Compatibility(wdWPJustification) = True .Compatibility(wdLineWrapLikeWord6) = False .Compatibility(wdShapeLayoutLikeWW8) = False .Compatibility(wdFootnoteLayoutLikeWW8) = False .Compatibility(wdDontUseHTMLParagraphAutoSpacing) = False .Compatibility(wdDontAdjustLineHeightInTable) = True .Compatibility(wdForgetLastTabAlignment) = False .Compatibility(wdAutospaceLikeWW7) = False .Compatibility(wdAlignTablesRowByRow) = False .Compatibility(wdLayoutRawTableWidth) = False .Compatibility(wdLayoutTableRowsApart) = False .Compatibility(wdUseWord97LineBreakingRules) = False .Compatibility(wdDontBreakWrappedTables) = False .Compatibility(wdDontSnapTextToGridInTableWithObjects) = False .Compatibility(wdSelectFieldWithFirstOrLastCharacter) = False .Compatibility(wdApplyBreakingRules) = False .Compatibility(wdDontWrapTextWithPunctuation) = False .Compatibility(wdDontUseAsianBreakRulesInGrid) = False End With ActiveDocument.Save ActiveDocument.Close With AutoCorrect .CorrectInitialCaps = False .CorrectSentenceCaps = False .CorrectDays = True .CorrectCapsLock = True .ReplaceText = True .ReplaceTextFromSpellingChecker = False .CorrectKeyboardSetting = False .DisplayAutoCorrectOptions = False .CorrectTableCells = False End With With Options .AutoFormatAsYouTypeApplyHeadings = False .AutoFormatAsYouTypeApplyBorders = False .AutoFormatAsYouTypeApplyBulletedLists = False .AutoFormatAsYouTypeApplyNumberedLists = False .AutoFormatAsYouTypeApplyTables = False .AutoFormatAsYouTypeReplaceQuotes = False .AutoFormatAsYouTypeReplaceSymbols = False .AutoFormatAsYouTypeReplaceOrdinals = True .AutoFormatAsYouTypeReplaceFractions = True .AutoFormatAsYouTypeReplacePlainTextEmphasis = False .AutoFormatAsYouTypeReplaceHyperlinks = False .AutoFormatAsYouTypeFormatListItemBeginning = False .AutoFormatAsYouTypeDefineStyles = False .TabIndentKey = True End With With Options .AutoFormatApplyHeadings = False .AutoFormatApplyLists = False .AutoFormatApplyBulletedLists = False .AutoFormatApplyOtherParas = False .AutoFormatReplaceQuotes = False .AutoFormatReplaceSymbols = False .AutoFormatReplaceOrdinals = True .AutoFormatReplaceFractions = True .AutoFormatReplacePlainTextEmphasis = False .AutoFormatReplaceHyperlinks = False .AutoFormatPreserveStyles = True .AutoFormatPlainTextWordMail = True End With With Options .LabelSmartTags = False .DisplaySmartTagButtons = False End With With ActiveDocument.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = InchesToPoints(1) .BottomMargin = InchesToPoints(1) .LeftMargin = InchesToPoints(1) .RightMargin = InchesToPoints(1) .Gutter = InchesToPoints(0) .HeaderDistance = InchesToPoints(0.5) .FooterDistance = InchesToPoints(0.5) .PageWidth = InchesToPoints(8.5) .PageHeight = InchesToPoints(11) .FirstPageTray = wdPrinterDefaultBin .OtherPagesTray = wdPrinterDefaultBin .SectionStart = wdSectionNewPage .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = False .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = False .MirrorMargins = False .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft .SetAsTemplateDefault End With CommandBars("Standard").Visible = False CommandBars("Firm").Visible = True CommandBars("Formatting").Visible = True Kill "D:\COREL\WP2000\PROGRAMS\WPWIN9.EXE" End Sub