回覆列表
  • 1 # 使用者6437608732773

    Option Explicit

    Dim pTime As Date

    Sub Runtimer()

    pTime = Now + TimeValue("00:00:06")

    Application.OnTime pTime, "myUpDate"

    End Sub

    Sub myUpDate()

    Dim aStory As Range

    Application.ScreenUpdating = False

    For Each aStory In ActiveDocument.StoryRanges

    aStory.Fields.update

    Next aStory

    Application.ScreenUpdating = True

    Runtimer

    End Sub

    執行myUpData宏,或者加上下面的部分,直接設為開啟自動執行

    Private Sub Document_open()

    myUpDate

    End Sub

    更新的間隔 TimeValue("00:00:06")

  • 中秋節和大豐收的關聯?
  • 徐璣《山居 》 賞析有木有?