Word VBA教程:Visual Basic 命令对照表 U 到 V

ABCDEFGHIJKLMNOPRSTUVWY

U  
UCase$(string) UCase(string)

'或

UCase$(string)

Underline, Underline() ActiveDocument.Words(1).Underline = True

status = Selection.Font.Underline

UnHang ActiveDocument.Paragraphs(1).TabHangingIndent Count:=-1
UnIndent Selection.Paragraphs.TabIndent Count:=-1
UnlinkFields Selection.Range.Fields.Unlink

ActiveDocument.Fields(num).Unlink

UnlockFields Selection.Paragraphs(1).Range.Fields.Locked = False

ActiveDocument.Fields(num).Locked = False

UpdateFields ActiveDocument.Sections(1).Range.Fields.Update

ActiveDocument.Fields(num).Update

UpdateSource ActiveDocument.Paragraphs(1).Range.Fields.UpdateSource

ActiveDocument.Fields(num).UpdateSource


V  
Val(text) Val(text)
ViewAnnotations ActiveWindow.View.SplitSpecial = wdPaneComments
ViewBorderToolbar CommandBars("Borders").Visible = True
ViewDraft, ViewDraft() ActiveWindow.View.Draft = True

x = ActiveWindow.View.Draft

ViewDrawingToolbar CommandBars("Drawing").Visible = True
ViewEndnoteArea, ViewEndnoteArea() ActiveWindow.View.SplitSpecial = wdPaneEndnotes

x = ActiveWindow.View.SplitSpecial

ViewEndnoteContNotice ActiveWindow.View.SplitSpecial = wdPaneEndnoteContinuationNotice
ViewEndnoteContSeparator ActiveWindow.View.SplitSpecial = wdPaneEndnoteContinuationSeparator
ViewEndnoteSeparator ActiveWindow.View.SplitSpecial = wdPaneEndnoteSeparator
ViewFieldCodes ActiveWindow.View.ShowFieldCodes = True
ViewFooter, ViewFooter() ActiveWindow.View.SplitSpecial = wdPaneCurrentPageFooter

'或

With ActiveWindow.View

    .Type = wdPrintView

    .SeekView = wdSeekCurrentPageFooter

End With

'可用 StoryType属性返回活动的文字部分或窗格

aPane = Selection.StoryType

ViewFootnoteArea, ViewFootnoteArea() ActiveWindow.View.SplitSpecial = wdPaneFootnotes

x = ActiveWindow.View.SplitSpecial

ViewFootnoteContNotice ActiveWindow.View.SplitSpecial = wdPaneFootnoteContinuationNotice
ViewFootnoteContSeparator ActiveWindow.View.SplitSpecial = wdPaneFootnoteContinuationSeparator
ViewFootnotes, ViewFootnotes() If ActiveDocument.Footnotes.Count >= 1 Then

    ActiveWindow.View.SplitSpecial = wdPaneFootnotes

ElseIf ActiveDocument.Endnotes.Count >= 1 Then

    ActiveWindow.View.SplitSpecial = wdPaneEndnotes

End If

'可通过 Information属性判断选定部分是否位于脚注或尾注窗格中

x = Selection.Information(wdInFootnoteEndnotePane)

ViewFootnoteSeparator ActiveWindow.View.SplitSpecial = wdPaneFootnoteSeparator
ViewHeader, ViewHeader() ActiveWindow.View.SplitSpecial = wdPaneCurrentPageHeader

'或

With ActiveWindow.View

    .Type = wdPrintView

    .SeekView = wdSeekCurrentPageHeader

End With

'可用 StoryType属性返回活动的文字部分或窗格

aPane = Selection.StoryType

ViewMasterDocument, ViewMasterDocument() ActiveWindow.View.Type = wdMasterView

aView = ActiveWindow.View.Type

ViewMenus() 不适用于 Word 2002
ViewNormal, ViewNormal() ActiveWindow.View.Type =wdNormalView

x = ActiveWindow.View.Type

ViewOutline, ViewOutline() Windows(1).View.Type =wdOutlineView

x = Windows(1).View.Type

ViewPage, ViewPage() Windows(name).View.Type =wdPrintView

x = Windows(name).View.Type

ViewRibbon, ViewRibbon() CommandBars("Formatting").Visible = True

x = CommandBars("Formatting").Visible

ViewRuler, ViewRuler() ActiveWindow.DisplayRulers = True

x = ActiveWindow.DisplayRulers

ViewStatusBar, ViewStatusBar() Application.DisplayStatusBar = True

x = Application.DisplayStatusBar

ViewToggleMasterDocument If ActiveWindow.View.Type = wdOutlineView Then

    ActiveWindow.View.Type = wdMasterView

ElseIf ActiveWindow.View.Type = wdMasterView Then

    ActiveWindow.View.Type = wdOutlineView

End If

ViewToolbars LargeButtons, ToolTips, ToolTipsKey, Reset, Delete, Show With CommandBars

    .LargeButtons = True

    .DisplayToolTips = True

    .DisplayKeysInToolTips = True

End With

CommandBars(name).Reset

CommandBars(name).Delete

CommandBars(name).Visible = True

ViewZoom AutoFit

ViewZoom TwoPages

ViewZoom TwoPages

ViewZoom NumColumns, NumRows

ViewZoom ZoomPercent

Windows(name).View.Zoom.PageFit = wdPageFitBestFit

With ActiveWindow.View.Zoom

    .PageColumns = 2

    .PageRows = 1

End With

ActiveWindow.View.Zoom.PageFit = wdPageFitFullPage

With ActiveWindow.View.Zoom

    .PageColumns = num

    .PageRows = num

End With

ActiveWindow.View.Zoom.Percentage = num

ViewZoom100 Windows(1).View.Zoom.Percentage = 100
ViewZoom200 ActiveWindow.View.Zoom.Percentage = 200
ViewZoom75 ActiveWindow.View.Zoom.Percentage = 75
ViewZoomPageWidth Windows(name).View.Zoom.PageFit = wdPageFitBestFit
ViewZoomWholePage ActiveWindow.View.Zoom.PageFit = wdPageFitFullPage
VLine ActiveWindow.SmallScroll Down:=num

'或

ActiveWindow.SmallScroll Up:=num

VPage ActiveWindow.LargeScroll Down:=num

'或

ActiveWindow.LargeScroll Up:=num

VScroll, VScroll() ActiveWindow.VerticalPercentScrolled = num

num = ActiveWindow.VerticalPercentScrolled

Word VBA教程

Word VBA参考教程:目录1 Word VBA参考教程:目录2
Word VBA参考教程:目录3 Word VBA参考教程:目录4
Word VBA参考教程:目录5 Word VBA参考教程:目录6
Word VBA参考教程:目录7 Word VBA参考教程:目录8
Word VBA参考教程:目录9 Word VBA参考教程:目录10
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号