Visual Basic 命令对照表 T

   

ABCDEFGHIJKLMNOPRSTUVWY

T  
TabLeader$(pos) aType = Selection.Paragraphs(num).TabStops(pos).Leader
TableAutoFormat ActiveDocument.Tables(1).AutoFormat
TableAutoSum ActiveDocument.Tables(1).Cell(row, column).AutoSum
TableColumnWidth ColumnWidth, RulerStyle

TableColumnWidth AutoFit

TableColumnWidth NextColumn

TableColumnWidth PrevColumn

TableColumnWidth SpaceBetweenCols

ActiveDocument.Tables(1).Columns.SetWidth ColumnWidth:=num, Rulerstyle:=wdRulerStyle

ActiveDocument.Tables(1).Columns.AutoFit

Selection.Columns(1).Next.Select

Selection.Columns(1).Previous.Select

ActiveDocument.Tables(1).Rows.SpaceBetweenColumns = num

TableDeleteCells ShiftCells ActiveDocument.Tables(1).Cell(row, column).Delete ShiftCells:=WdDeleteCells
TableDeleteColumn ActiveDocument.Tables(1).Columns(num).Delete

'或

ActiveDocument.Tables(1).Columns.Delete

TableDeleteRow ActiveDocument.Tables(1).Rows(num).Delete

'或

ActiveDocument.Tables(1).Rows.Delete

TableFormula ActiveDocument.Tables(1).Cell(row, column).Formula
TableGridlines, TableGridlines() ActiveWindow.View.TableGridlines = True

x = ActiveWindow.View.TableGridlines

TableHeadings, TableHeadings() Selection.Tables(1).Rows(num).HeadingFormat = True

'或

Selection.Tables(1).Rows.HeadingFormat = True

x = Selection.Tables(1).Rows.HeadingFormat

TableInsertCells Selection.Tables(1).Columns(num).Cells.Add
TableInsertColumn Selection.Tables(1).Columns.Add
TableInsertRow Selection.Tables(1).Rows.Add
TableInsertTable NumColumns, NumRows

TableInsertTable NumColumns, NumRows, Format, Apply

TableInsertTable NumColumns, NumRows, ConvertFrom

ActiveDocument.Tables.Add Range:=range, NumRows:=num, NumColumns:=num

ActiveDocument.Tables.Add(Range:=range, NumRows:=num, NumColumns:=num).AutoFormat

Selection.ConvertToTable Separator:=WdTableFieldSeparator, NumRows:=num, NumColumns:=num

TableMergeCells Selection.Cells.Merge
TableRowHeight RulerStyle, LineSpacingRule, LineSpacing, LeftIndent, Alignment, AllowRowSplit

TableRowHeight NextColumn

TableRowHeight PrevColumn

With ActiveDocument.Tables(num).Rows(num)

    .SetHeight RowHeight:= num, HeightRule:=WdRowHeightRule

    .Alignment = WdRowAlignment

    .SetLeftIndent LeftIndent:=num, RulerStyle:=WdRulerStyle

    .AllowBreakAcrossPages = True

End With

Selection.Rows(1).Next.Select

Selection.Rows(1).Previous.Select

TableSelectColumn Selection.Tables(1).Columns(num).Select
TableSelectRow Selection.Tables(1).Rows(num).Select
TableSelectTable ActiveDocument.Tables(1).Select
TableSort ActiveDocument.Tables(1).Sort
TableSortAToZ ActiveDocument.Tables(1).SortAscending
TableSortZToA ActiveDocument.Tables(1).SortDescending
TableSplit Selection.Tables(1).Split
TableSplitCells Selection.Tables(1).Cells(row, column).Split
TableToText Selection.Tables(1).ConvertToText
TableUpdateAutoFormat Selection.Tables(1).UpdateAutoFormat
TabType() x = Selection.ParagraphFormat.TabStops(1).Alignment
Text 标签控件
文本框 文本框控件
TextFormField ActiveDocument.FormFields.Add Range:=range, Type:=wdFieldFormTextInput
TextToTable] Selection.ConvertToTable
Time$() Time()

'或

Time$()

TimeSerial() TimeSerial
TimeValue() TimeValue
TipWizard 无直接对应项

'在 Word 启动后显示特定的提示信息

Assistant.FeatureTips = True

Today() Dim x As Long

x = DateSerial(Year(Date), Month(Date), Day(Date))

ToggleFieldDisplay Selection.Fields.ToggleShowCodes
ToggleFull ActiveWindow.View.FullScreen = Not ActiveWindow.View.FullScreen
ToggleHeaderFooterLink ActiveDocument.Sections(2).Headers(wdHeaderFooterPrimary).LinkToPrevious
ToggleMainTextLayer ActiveWindow.View.ShowMainTextLayer = Not ActiveWindow.View.ShowMainTextLayer
TogglePortrait ActiveDocument.PageSetup.TogglePortrait
ToggleScribbleMode WordBasic.ToggleScribbleMode
ToolbarButtonMacro$() x = CommandBars(name).Controls(1).OnAction
name = ToolbarName$() name = CommandBars(num).Name
ToolbarState(name) CommandBars(name).Visible = True
ToolsAddRecordDefault WordBasic.ToolsAddRecordDefault

'或当数据源为 Word 表格时:

Selection.Tables(1).Cell(Row:=Selection.Information(wdMaximumNumberOfRows), _

    Column:=Selection.Information(wdMaximumNumberOfColumns)).Select

Selection.MoveRight Unit:=wdCell

ToolsAdvancedSettings 不可用于任何 32 位版本的 Windows 及其后续版本。
ToolsAutoCorrect InitialCaps, SentenceCaps, Days, CapsLock, ReplaceText

ToolsAutoCorrect SmartQuotes

ToolsAutoCorrect Formatting, Replace, With, Add

ToolsAutoCorrect Formatting, Replace, With, Add

ToolsAutoCorrect .Replace = text, .Delete

With AutoCorrect

    .CorrectInitialCaps = True

    .CorrectSentenceCaps = True

    .CorrectDays = True

    .CorrectCapsLock = True

    .ReplaceText = True

End With

Options.AutoFormatAsYouTypeReplaceQuotes = True

AutoCorrectEntries.AddRichText Name:= text, Range:=range

AutoCorrectEntries.Add Name:= text, Value:= text

AutoCorrectEntries(name).Delete

ToolsAutoCorrectCapsLockOff, ToolsAutoCorrectCapsLockOff() AutoCorrect.CorrectCapsLock = True
ToolsAutoCorrectDays, ToolsAutoCorrectDays() AutoCorrect.CorrectDays = True
ToolsAutoCorrectExceptions Tab = 0, Name, Add

ToolsAutoCorrectExceptions Tab = 1, Name, Add

ToolsAutoCorrectExceptions Tab = 0, AutoAdd

ToolsAutoCorrectExceptions Tab = 1, AutoAdd

ToolsAutoCorrectExceptions Tab = 0, Name, .Delete

ToolsAutoCorrectExceptions Tab = 1, Name, Delete

FirstLetterExceptions.Add name

TwoInitialCapsExceptions.Add name

AutoCorrect.FirstLetterAutoAdd = True

AutoCorrect.TwoInitialCapsAutoAdd = True

FirstLetterExceptions(name).Delete

TwoInitialCapsExceptions(name).Delete

ToolsAutoCorrectInitialCaps, ToolsAutoCorrectInitialCaps() AutoCorrect.CorrectInitialCaps = True
ToolsAutoCorrectReplaceText, ToolsAutoCorrectReplaceText() AutoCorrect.ReplaceText = True
ToolsAutoCorrectSentenceCaps, ToolsAutoCorrectSentenceCaps() AutoCorrect.CorrectSentenceCaps = True
ToolsAutoCorrectSmartQuotes, ToolsAutoCorrectSmartQuotes() Options.AutoFormatAsYouTypeReplaceQuotes = True
ToolsBulletListDefault Selection.Range.ListFormat.ApplyBulletDefault
ToolsBulletsNumbers Replace, Font, CharNum, Type, FormatOutline, AutoUpdate, FormatNumber, Punctuation, StartAt, Points, Hang, Indent, Remove With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)

    .NumberFormat = "%1."

    .TrailingCharacter = WdTrailingCharacter

    .NumberStyle = WdListNumberStyle

    .Alignment = WdListLevelAlignment

    .TextPosition = InchesToPoints(num)

    .TabPosition = InchesToPoints(num)

    .ResetOnHigher = True

    .StartAt = num

    .Font.Size = num

End With

Selection.Range.ListFormat.ApplyListTemplate _

        ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(1)

ToolsCalculate, ToolsCalculate() Selection.Range.Calculate
ToolsCompareVersions ActiveDocument.Compare
ToolsCreateEnvelope PrintEnvLabel

ToolsCreateEnvelope AddToDocument

ActiveDocument.Envelope.Insert

ActiveDocument.Envelope.PrintOut

ToolsCreateLabels PrintEnvLabel

ToolsCreateLabels AddToDocument

Application.MailingLabel.PrintOut

Application.MailingLabel.CreateNewDocument

ToolsCustomize Tab With Dialogs(WdWordDialog)

    .DefaultTab = WdWordDialogTab

    .Show

End With

ToolsCustomizeKeyboard KeyCode, KeyCode2, Category, Name, Add, Remove, ResetAll, CommandValue, Context CustomizationContext = template or document

KeyBindings.Add

CustomizationContext = template or document

FindKey(BuildKeyCode(Wdkey, Wdkey)).Disable

CustomizationContext = template or document

KeyBindings.ClearAll

ToolsCustomizeMenuBar Context, Position, MenuType, MenuText, Menu, Add, Remove, Rename CustomizationContext = template or document

CommandBars(name).Delete

CommandBars.Add

CommandBars(name).Name = text

ToolsCustomizeMenus MenuType, Position, Category, Name, Menu, AddBelow, MenuText, Rename, Add, Remove, ResetAll, CommandValue, Context CustomizationContext = template or document

CommandBars(name).Controls(num).Delete

CommandBars(name).Controls.Add Type:=msoControlButton, ID:=num, Before:=num

CommandBars(name).Controls(num).Caption = text

ToolsGetSpelling, ToolsGetSpelling() GetSpellingSuggestions
ToolsGetSynonyms, ToolsGetSynonyms() SynonymInfo
ToolsGrammar ActiveDocument.CheckGrammar
ToolsGrammarStatisticsArray '列举 ReadabilityStatistics 集合的元素

i = 1

For Each aStat In ActiveDocument.ReadabilityStatistics

    aArray(i) = aStat.Value

    i = i + 1

Next aStat

ToolsHyphenation AutoHyphenation, HyphenateCaps, HyphenationZone, LimitConsecutiveHyphens With ActiveDocument

    .AutoHyphenation = True

    .HyphenateCaps = True

    .HyphenationZone = num

    .ConsecutiveHyphensLimit = num

End With

ToolsHyphenationManual ActiveDocument.ManualHyphenation
ToolsLanguage Language, Default Selection.Range.LanguageID = WdLanguageID

ActiveDocument.Styles(wdStyleNormal).LanguageID = WdLanguageID

ToolsMacro Name, Run, Edit, Show, Delete, Rename, Description, NewName, SetDesc Application.Run

Application.OrganizerDelete

Application.OrganizerRename

With Dialogs(wdDialogToolsMacro)

    .Show = "templateName"

    .Name = "macroName"

    .Edit = True

    .Execute

End With

With Dialogs(wdDialogToolsMacro)

    .Show = "templateName"

    .Name = "macroName"

    .Description = "newDescription"

    .SetDesc = True

    .Execute

End With

ToolsManageFields Application.Run MacroName:="ToolsManageFields"
ToolsMergeRevisions ActiveDocument.Merge FileName:=name
ToolsNumberListDefault Selection.Range.ListFormat.ApplyNumberDefault
ToolsOptions Dialogs(WdWordDialog).Show
ToolsOptionsAutoFormat PreserveStyles, ApplyStylesHeadings, ApplyStylesLists, ApplyStylesOtherParas, ReplaceQuotes, ReplaceSymbols, ApplyBulletedLists, ReplaceOrdinals, ReplaceFractions, ShowOptionsFor

ToolsOptionsAutoFormat ApplyBorders, ApplyBulletedLists, ApplyStylesHeadings, ApplyNumberedLists, ReplaceFractions, ReplaceOrdinals, ReplaceQuotes, ReplaceSymbols, ShowOptionFor

There is no Visual Basic equivalent for the following arguments: AdjustParaMarks, AdjustTabsSpaces, ReplaceBullets, AdjustEmptyParas.

With Options

    .AutoFormatPreserveStyles = True

    .AutoFormatApplyHeadings = True

    .AutoFormatApplyLists = True

    .AutoFormatApplyOtherParas = True

    .AutoFormatReplaceQuotes = True

    .AutoFormatReplaceSymbols = True

    .AutoFormatApplyBulletedLists = True

    .AutoFormatReplaceOrdinals = True

    .AutoFormatReplaceFractions = True

End With

With Options

    .AutoFormatAsYouTypeApplyBorders = True

    .AutoFormatAsYouTypeApplyBulletedLists = True

    .AutoFormatAsYouTypeApplyHeadings = True

    .AutoFormatAsYouTypeApplyNumberedLists = True

    .AutoFormatAsYouTypeReplaceFractions = True

    .AutoFormatAsYouTypeReplaceOrdinals = True

    .AutoFormatAsYouTypeReplaceQuotes = True

    .AutoFormatAsYouTypeReplaceSymbols = True

End With

ToolsOptionsCompatibility ActiveDocument.Compatibility Type:=WdCompatibility
ToolsOptionsEdit ReplaceSelection, DragAndDrop, AutoWordSelection, InsForPaste, Overtype, SmartCutPaste, AllowAccentedUppercase, PictureEditor, TabIndent With Options

    .ReplaceSelection = True

    .AllowDragAndDrop = True

    .AutoWordSelection = True

    .INSKeyForPaste = True

    .Overtype = True

    .SmartCutPaste = True

    .AllowAccentedUppercase = True

    .PictureEditor = text

    .TabIndentKey = True

End With

ToolsOptionsFileLocations Options.DefaultFilePath(WdDefaultFilePath) = text
ToolsOptionsGeneral Pagination, WPHelp, WPDocNavKeys, BlueScreen, ErrorBeeps, UpdateLinks, SendMailAttach, Units, ButtonFieldClicks, ShortMenuNames, RTFInClipboard, ConfirmConversions, TipWizardActive, RecentFiles, RecentFileCount With Options

    .Pagination = True

    .WPHelp = True

    .WPDocNavKeys = True

    .BlueScreen = True

    .EnableSound = True

    .UpdateLinksAtOpen = True

    .SendMailAttach = True

    .MeasurementUnit = WdUnits

    .ButtonFieldClicks = num

    .ShortMenuNames = True

    .RTFInClipboard = True

    .ConfirmConversions = True

End With

Assistant.ActivateWizard

With Application

    .DisplayRecentFiles = True

    .RecentFiles.Maximum = num

End With

ToolsOptionsGrammar Options, CheckSpelling, ShowStatistics With Options

    .CheckGrammarWithSpelling = True

    .ShowReadabilityStatistics = True

End With

ActiveDocument.ActiveWritingStyle(language) = text

ToolsOptionsPrint Draft, Reverse, UpdateFields, Summary, ShowCodes, Annotations, ShowHidden, EnvFeederInstalled, UpdateLinks, Background, DrawingObjects, DefaultTray, FormsData, FractionalWidths, PSOverText With Options

    .PrintDraft = True

    .PrintReverse = True

    .UpdateFieldsAtPrint = True

    .PrintProperties = True

    .PrintFieldCodes = True

    .PrintComments = True

    .PrintHiddenText = True

    .EnvelopeFeederInstalled = True

    .UpdateLinksAtPrint = True

    .PrintBackground = True

    .PrintDrawingObjects = True

    .DefaultTray = text

    .DefaultTrayID = WdPaperTray

End With

With ActiveDocument

    .PrintFormsData = True

    .PrintFractionalWidths = True

    .PrintPostScriptOverText = True

End With

ToolsOptionsRevisions InsertedTextMark, DeletedTextMark, RevisedLinesMark, InsertedTextColor, DeletedTextColor, RevisedLinesColor, HighlightColor With Options

    .InsertedTextMark = WdInsertedTextMark

    .DeletedTextMark = WdDeletedTextMark

    .RevisedLinesMark = WdRevisedLinesMark

    .InsertedTextColor = WdColorIndex

    .DeletedTextColor = WdColorIndex

    .RevisedLinesColor = WdColorIndex

    .DefaultHighlightColorIndex = WdColorIndex

End With

ToolsOptionsSave CreateBackup, FastSaves, SummaryPrompt, GlobalDotPrompt, NativePictureFormat, AutoSave, SaveInterval

ToolsOptionsSave FormsData, Password, WritePassword, RecommendReadOnly, EmbedFonts

With Options

    .CreateBackup = True

    .AllowFastSave = True

    .SavePropertiesPrompt = True

    .SaveNormalPrompt = True

    .BackgroundSave = True

    .SaveInterval = number

End With

With ActiveDocument

    .SaveFormsData = True

    .Password = text

    .WritePassword = text

    .ReadOnlyRecommended = True

    .EmbedTrueTypeFonts = True

End With

ToolsOptionsSpelling AlwaysSuggest, SuggestFromMainDictOnly, IgnoreAllCaps, IgnoreMixedDigits, ResetIgnoreAll, Type, CustomDictn, AutomaticSpellChecking, HideSpellingErrors, RecheckDocument With Options

    .SuggestSpellingCorrections = True

    .SuggestFromMainDictionaryOnly = True

    .IgnoreUppercase = True

    .IgnoreMixedDigits = True

    .CheckSpellingAsYouType = True

End With

With ActiveDocument

    .SpellingChecked = False

    .ShowSpellingErrors = True

End With

Application.ResetIgnoreAll

Languages(wdLanguageID).SpellingDictionaryType = wdDictionaryType

CustomDictionaries.Add

ToolsOptionsUserInfo Name, Initials, Address With Application

    .UserName = text

    .UserInitials = text

    .UserAddress = text

End With

ToolsOptionsView DraftFont, WrapToWindow, PicturePlaceHolders, FieldCodes, BookMarks, FieldShading, Hscroll, Vscroll, StyleAreaWidth, Tabs, Spaces, Paras, Hyphens, Hidden, ShowAll, Drawings, Anchors, TextBoundaries, Vruler, Highlight

ToolsOptionsView StatusBar

With ActiveWindow.View

    .Draft = True

    .WrapToWindow = True

    .ShowPicturePlaceHolders = True

    .ShowFieldCodes = True

    .ShowBookmarks = True

    .FieldShading = WdFieldShading

    .Parent.DisplayHorizontalScrollBar = True

    .Parent.DisplayVerticalScrollBar = True

    .Parent.StyleAreaWidth = num

    .ShowTabs = True

    .ShowSpaces = True

    .ShowParagraphs = True

    .ShowHyphens = True

    .ShowHiddenText = True

    .ShowAll = True

    .ShowDrawings = True

    .ShowObjectAnchors = True

    .ShowTextBoundaries = True

    .Parent.DisplayVerticalRuler = True

    .ShowHighlight = True

End With

Application.DisplayStatusBar = True

ToolsProtectDocument ActiveDocument.Protect
ToolsProtectSection Protect, Section ActiveDocument.Sections(num).ProtectedForForms = True
ToolsRemoveRecordDefault WordBasic.ToolsRemoveRecordDefault

'或当数据源为 Word 表格时:

Selection.Tables(1).Rows(1).Delete

ToolsRepaginate ActiveDocument.Repaginate
ToolsReviewRevisions ShowMarks, HideMarks, Wrap, FindPrevious, FindNext, AcceptRevisions, RejectRevisions ActiveDocument.ShowRevisions = True

Selection.NextRevision

Selection.PreviousRevision

Selection.Range.Revisions.AcceptAll

Selection.Range.Revisions.RejectAll

ToolsRevisionAuthor$() anAuthor = Selection.Range.Revisions(1).Author
ToolsRevisionDate$() aDate = ActiveDocument.Revisions(1).Date
ToolsRevisions MarkRevisions, ViewRevisions, PrintRevisions, AcceptAll, RejectAll With ActiveDocument

    .TrackRevisions = True

    .PrintRevisions = True

    .ShowRevisions = True

End With

With Selection.Range.Revisions

    .AcceptAll

    .RejectAll

End With

ToolsRevisionType() aType = ActiveDocument.Revisions(1).Type
ToolsShrinkToFit ActiveDocument.FitToPages
ToolsSpelling ActiveDocument.CheckSpelling
ToolsSpellingRecheckDocument ActiveDocument.SpellingChecked = False
ToolsSpellSelection Selection.Range.CheckSpelling
ToolsThesaurus Selection.Range.CheckSynonyms
ToolsUnprotectDocument ActiveDocument.UnProtect(Password:=text)
ToolsWordCount CountFootnotes, Pages, Words, Characters, Paragraphs, Lines ActiveDocument.ComputeStatistics Statistic:=WdStatistic, IncludeFootnotesAndEndnotes:=True