Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Sub setHyperLinkEntries() previousxWord = "" For Each xWord In ActiveDocument.Words If Len(xWord) = 6 Then If IsNumeric(Right(Left(xWord, 3), 1)) Then If Left(xWord, 2) = "HL" Then xWord.Select If Selection.Range.Text <> previousxWord Then ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _ "https://sharepointsite/_layouts/WordViewer.aspx?id=/Shared%20Documents/" & Selection.Range.Text & ".docx" _ , SubAddress:="", ScreenTip:="", TextToDisplay:=Selection.Range.Text xWord.Select Selection.Move wdWord, 2 End If Else End If Else End If Else End If Next xWord End Sub
Sample Text (you can use this to test the procedure) 2.2.6 Access rights are specified in section 11.1 below. Access rights are personal, are set out in individual User Agreements (see section 11.2 and 11.3 below) and cannot be delegated. 2.2.7 The authorization procedure for new information processing facilities is set out in HL0604. 2.3 Org's ISMS documentation is protected and controlled. There is a documented procedure (HL0001) which takes 2.2 above into account and defines the management actions for document control. [ISO27001 4.3.2] 2.4 Org has a documented procedure (HL0002) which defines the controls for identification, storage, protection, retrieval, retention time and disposal of records. [ISO27001 4.3.3] Documents are available to those who need and are authorized to access them in line with these retention requirements.
Join the community of 500,000 technology professionals and ask your questions.