View Single Post
 
Old 11-21-2018, 11:36 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,980
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You don't need to be a novice to be confused by what you are trying to achieve. This is pretty advanced stuff and less than 5% of Word users would have any idea on what we are talking about.

I've been working in a vacuum somewhat because I have no knowledge of how Trados interfaces with the Word documents but now I've seen the old file I can make much better assumptions about how you might game the system and code a solution to lock those parts of the file.

If you used the New file but removed each of the CCs that you added in your testing (right click and remove CC) then the following macro would group all the grey areas
Code:
Sub GroupTags()
  Dim aRng As Range
  Set aRng = ActiveDocument.Range(0, 0)
  With aRng.Find
    .ClearFormatting
    .Font.Color = wdColorGray50
    .Replacement.ClearFormatting
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    Do While .Execute
      aRng.ContentControls.Add (wdContentControlGroup)
    Loop
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote