Results 1 to 8 of 8
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    track changes code - manual changes to trach chang (OfficeXP S_3)

    Hiya

    I remember some time ago seeing code for if someone has applied manual formatting to text ,so it looks like track changes - the code automates & converts the manual to track changes it so you dont have to manually go thru the document & track.

    any ideas?
    diana

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: track changes code - manual changes to trach c

    I'm not sure I understand what you're asking for. You want individual direct formatting to be called out in some manner? For example, {BOLD ON} and {BOLD OFF} around bold text where it departs from the underlying paragraph style?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: track changes code - manual changes to trach chang (OfficeXP S_3)

    Jefferson posted code to do the reverse - change tracking into direct formatting - in <post#=138248>post 138248</post#>. Perhaps that's what you remembered?

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: track changes code - manual changes to trach c

    I think there was another thread, which had something to do with finding "noncompliant" text. There were two versions, one of which viewed any departure from the paragraph formatting as deviant, while the other overlooked variations attributable to character styles and drilled down on direct formatting. But I can't recall the nature of the output from those procedures...

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: track changes code - manual changes to trach c

    hi jefferson

    yes in the very long client document the method the client has used to 'track change' is:
    select text> Format Font> apply Blue colour & underline - this displays an insertion
    select text> Format Font> apply Red colour & strikethrough - this displays a deletion.

    this is what i meant by 'manual' track changes.

    The owner of the doc was told that to display track changes , they have to go through the whole document and for each track change manually apply the 'real track changes', which will be very time consuming.

    I remember a post that had code to automate this is one hit.

    diana :-)

  6. #6
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: track changes code - manual changes to trach c

    If you don't find it, it'll probably be pretty easy to create the macro with the macro recorder:
    -- Edit > Find, look for "blue color and underline",
    -- remove blue color and underline,
    -- Turn off Track Changes,
    -- Edit > Cut,
    -- Turn on Track changes,
    -- paste.

    -- Edit > Find, look for "red color and strikethrough",
    -- Turn off Track changes,
    -- remove red color and strikethrough,
    -- Turn on Track Changes,
    -- Edit > Delete.

    You then can edit the macro to repeat the replacements until no more formatted (blue/red) text is found (While Find.Execute ... Wend).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: track changes code - manual changes to trach c

    The macro recorder doesn't work too well, so here's the macro:<pre> Selection.Find.ClearFormatting
    Selection.Find.Font.Underline = wdUnderlineSingle
    Selection.Find.Font.Color = wdColorBlue
    With Selection.Find
    .Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchWholeWord = False
    .MatchWildcards = False
    End With
    While Selection.Find.Execute
    If ActiveDocument.ProtectionType <> wdNoProtection Then
    ActiveDocument.Unprotect
    End If
    Selection.Cut
    With Selection.Font
    .Underline = wdUnderlineNone
    .Color = wdColorAutomatic
    End With
    ActiveDocument.Protect Password:="", NoReset:=False, _
    Type:=wdAllowOnlyRevisions, UseIRM:=False, _
    EnforceStyleLock:=False
    Selection.Paste
    Wend
    Selection.Find.ClearFormatting
    Selection.Find.Font.StrikeThrough = True
    Selection.Find.Font.Color = wdColorRed
    With Selection.Find
    .Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchWholeWord = False
    .MatchWildcards = False
    End With
    While Selection.Find.Execute
    ActiveDocument.Unprotect
    With Selection.Font
    .StrikeThrough = False
    .Color = wdColorAutomatic
    End With
    ActiveDocument.Protect Password:="", NoReset:=False, _
    Type:=wdAllowOnlyRevisions, UseIRM:=False, _
    EnforceStyleLock:=False
    Selection.Delete
    Wend
    </pre>

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: track changes code - manual changes to trach c

    thanks klause...
    yes i tried the macro recorder...it doesnt work that well.
    thats why i was after the code as i used it once before & it goes thru the whole doc

    diana :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •