Forum Discussion

Afzal_Sheikh's avatar
Afzal_Sheikh
Copper Contributor
Sep 17, 2021

VBA coding command in Quick Access Toolbar

Hi,

 

We have more than 500+ standard word templates for our day-to-day activities. These templates have editing restriction with password, user can change only in exception area only or through ASK field. For ASK field, I have VBA code for run ASK field. The following VBA coding are installed in each every system in our office.

 

Option Explicit

 

Sub UpdateAll()

Dim oStory As Range

    For Each oStory In ActiveDocument.StoryRanges

        oStory.Fields.Update

        If oStory.StoryType <> wdMainTextStory Then

            While Not (oStory.NextStoryRange Is Nothing)

                Set oStory = oStory.NextStoryRange

                   oStory.Fields.Update

            Wend

        End If

    Next oStory

lbl_Exit:

    Set oStory = Nothing

    Exit Sub

End Sub

 

But due to Virus protection scanner, this VBA coding removed while scanning, hence I have to installed again VBA coding on that respective system. Is there any easy way to install this VBA coding and automatically appear command in Customize Quick Access Toolbar. (means user can double click this VBA file and it will appear command in Customize Quick Access Toolbar).

 

Thanking you in advance,

 

Afzal

No RepliesBe the first to reply

Resources