M
MS
MS Office 2007 - Word - Tracking Changes Bug:
1º Step: Turn off "track changes";
2º Step: Insert text:
Normal text. The word "deleted" will be changed by "inserted".
1. This item will remain intact;
2. This item will be changed with the item 4;
3. The word "before" will be changed by the word "after";â€
4. This item will be changed with the item 2.
3º Step: Turn on "track changes" and make changes to the text (change
“deleted†by “insertedâ€, move the line (item) 2 after the line (item 4),
move the line with item 4 after line (item) 1 and change the word “before†by
the word “afterâ€) ;
4º Step: Turn off "track changes";
5º Step: change "Tracking changes options" all to "none".
Result: Word's “deleted†and “before†remain in the text, and line items
changed, also!!!!!
The macro “MSWord2007_Tracking_Changes_bug†was designed to execute the
previous actions:
Sub MSWord2007_Tracking_Changes_Bug()
'
' MS Oficce 2007 - Microsoft Word Tracking Changes Bug
'
'
Selection.TypeText Text:="1º Step: Turn off ""track changes"";"
ActiveDocument.TrackRevisions = False
Selection.TypeParagraph
Selection.TypeText Text:="2º Step: Insert text:"
Selection.TypeParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
Selection.TypeText Text:= _
"Normal text. The word ""deleted"" will be changed by ""inserted""."
Selection.TypeParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2.5)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = CentimetersToPoints(0.63)
.Alignment = wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = ""
End With
.LinkedStyle = ""
End With
ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdNumberGallery).ListTemplates(1),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.TypeText Text:="This item will remain intact;"
Selection.TypeParagraph
Selection.TypeText Text:="This item will be changed with the item 4;"
Selection.TypeParagraph
Selection.TypeText Text:= _
"The word ""before"" will be changed by the word ""after"";"
Selection.TypeParagraph
Selection.TypeText Text:="This item will be changed with the item 2."
Selection.TypeParagraph
Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(1.25)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
Selection.TypeText Text:= _
"3º Step: Turn on ""track changes"" and make changes to the text;"
With Options
.InsertedTextMark = wdInsertedTextMarkColorOnly
.InsertedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkStrikeThrough
.DeletedTextColor = wdDarkRed
.RevisedPropertiesMark = wdRevisedPropertiesMarkNone
.RevisedPropertiesColor = wdByAuthor
.RevisedLinesMark = wdRevisedLinesMarkNone
.RevisedLinesColor = wdAuto
.CommentsColor = wdByAuthor
.RevisionsBalloonPrintOrientation = wdBalloonPrintOrientationPreserve
End With
ActiveWindow.View.RevisionsMode = wdMixedRevisions
With Options
.MoveFromTextMark = wdMoveFromTextMarkDoubleStrikeThrough
.MoveFromTextColor = wdGreen
.MoveToTextMark = wdMoveToTextMarkDoubleUnderline
.MoveToTextColor = wdGreen
.InsertedCellColor = wdCellColorLightBlue
.MergedCellColor = wdCellColorLightYellow
.DeletedCellColor = wdCellColorPink
.SplitCellColor = wdCellColorLightOrange
End With
With ActiveDocument
.TrackMoves = True
.TrackFormatting = True
End With
ActiveDocument.TrackRevisions = True
Selection.MoveUp Unit:=wdLine, Count:=5
Selection.MoveLeft Unit:=wdCharacter, Count:=34
Selection.MoveRight Unit:=wdCharacter, Count:=8, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.TypeText Text:="inserted"
Selection.MoveDown Unit:=wdLine, Count:=3
Selection.MoveLeft Unit:=wdCharacter, Count:=19
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=3, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveUp Unit:=wdLine, Count:=2
Selection.Paragraphs(1).SelectNumber
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.MoveUp Unit:=wdLine, Count:=3
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveRight Unit:=wdCharacter, Count:=11
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=6, Extend:=wdExtend
Selection.TypeText Text:="after"
Selection.MoveDown Unit:=wdLine, Count:=3
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.TypeText Text:="4º Step: Turn off ""track changes"";"
ActiveDocument.TrackRevisions = False
Selection.TypeParagraph
Selection.TypeText Text:="5º Step: change ""Tracking Cahnges options""
to ""none""."
With Options
.InsertedTextMark = wdInsertedTextMarkNone
.InsertedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkNone
.DeletedTextColor = wdDarkRed
.RevisedPropertiesMark = wdRevisedPropertiesMarkNone
.RevisedPropertiesColor = wdByAuthor
.RevisedLinesMark = wdRevisedLinesMarkNone
.RevisedLinesColor = wdAuto
.CommentsColor = wdByAuthor
.RevisionsBalloonPrintOrientation = wdBalloonPrintOrientationPreserve
End With
ActiveWindow.View.RevisionsMode = wdMixedRevisions
With Options
.MoveFromTextMark = wdMoveFromTextMarkNone
.MoveFromTextColor = wdGreen
.MoveToTextMark = wdMoveToTextMarkNone
.MoveToTextColor = wdGreen
.InsertedCellColor = wdCellColorLightBlue
.MergedCellColor = wdCellColorLightYellow
.DeletedCellColor = wdCellColorPink
.SplitCellColor = wdCellColorLightOrange
End With
With ActiveDocument
.TrackMoves = False
.TrackFormatting = False
End With
Selection.TypeParagraph
Selection.TypeText Text:="result:"
Selection.Range.Case = wdNextCase
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Range.Case = wdNextCase
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Range.Case = wdNextCase
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.TypeText Text:= _
" Word's ""deleted"" and ""before"" remain in the text, and lines of
items changed, also!"
End Sub
1º Step: Turn off "track changes";
2º Step: Insert text:
Normal text. The word "deleted" will be changed by "inserted".
1. This item will remain intact;
2. This item will be changed with the item 4;
3. The word "before" will be changed by the word "after";â€
4. This item will be changed with the item 2.
3º Step: Turn on "track changes" and make changes to the text (change
“deleted†by “insertedâ€, move the line (item) 2 after the line (item 4),
move the line with item 4 after line (item) 1 and change the word “before†by
the word “afterâ€) ;
4º Step: Turn off "track changes";
5º Step: change "Tracking changes options" all to "none".
Result: Word's “deleted†and “before†remain in the text, and line items
changed, also!!!!!
The macro “MSWord2007_Tracking_Changes_bug†was designed to execute the
previous actions:
Sub MSWord2007_Tracking_Changes_Bug()
'
' MS Oficce 2007 - Microsoft Word Tracking Changes Bug
'
'
Selection.TypeText Text:="1º Step: Turn off ""track changes"";"
ActiveDocument.TrackRevisions = False
Selection.TypeParagraph
Selection.TypeText Text:="2º Step: Insert text:"
Selection.TypeParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
Selection.TypeText Text:= _
"Normal text. The word ""deleted"" will be changed by ""inserted""."
Selection.TypeParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(2.5)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = CentimetersToPoints(0.63)
.Alignment = wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = ""
End With
.LinkedStyle = ""
End With
ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdNumberGallery).ListTemplates(1),
ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.TypeText Text:="This item will remain intact;"
Selection.TypeParagraph
Selection.TypeText Text:="This item will be changed with the item 4;"
Selection.TypeParagraph
Selection.TypeText Text:= _
"The word ""before"" will be changed by the word ""after"";"
Selection.TypeParagraph
Selection.TypeText Text:="This item will be changed with the item 2."
Selection.TypeParagraph
Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(1.25)
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
End With
Selection.TypeText Text:= _
"3º Step: Turn on ""track changes"" and make changes to the text;"
With Options
.InsertedTextMark = wdInsertedTextMarkColorOnly
.InsertedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkStrikeThrough
.DeletedTextColor = wdDarkRed
.RevisedPropertiesMark = wdRevisedPropertiesMarkNone
.RevisedPropertiesColor = wdByAuthor
.RevisedLinesMark = wdRevisedLinesMarkNone
.RevisedLinesColor = wdAuto
.CommentsColor = wdByAuthor
.RevisionsBalloonPrintOrientation = wdBalloonPrintOrientationPreserve
End With
ActiveWindow.View.RevisionsMode = wdMixedRevisions
With Options
.MoveFromTextMark = wdMoveFromTextMarkDoubleStrikeThrough
.MoveFromTextColor = wdGreen
.MoveToTextMark = wdMoveToTextMarkDoubleUnderline
.MoveToTextColor = wdGreen
.InsertedCellColor = wdCellColorLightBlue
.MergedCellColor = wdCellColorLightYellow
.DeletedCellColor = wdCellColorPink
.SplitCellColor = wdCellColorLightOrange
End With
With ActiveDocument
.TrackMoves = True
.TrackFormatting = True
End With
ActiveDocument.TrackRevisions = True
Selection.MoveUp Unit:=wdLine, Count:=5
Selection.MoveLeft Unit:=wdCharacter, Count:=34
Selection.MoveRight Unit:=wdCharacter, Count:=8, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.TypeText Text:="inserted"
Selection.MoveDown Unit:=wdLine, Count:=3
Selection.MoveLeft Unit:=wdCharacter, Count:=19
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=3, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveUp Unit:=wdLine, Count:=2
Selection.Paragraphs(1).SelectNumber
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.MoveUp Unit:=wdLine, Count:=3
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Paragraphs(1).SelectNumber
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveRight Unit:=wdCharacter, Count:=11
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=6, Extend:=wdExtend
Selection.TypeText Text:="after"
Selection.MoveDown Unit:=wdLine, Count:=3
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.TypeText Text:="4º Step: Turn off ""track changes"";"
ActiveDocument.TrackRevisions = False
Selection.TypeParagraph
Selection.TypeText Text:="5º Step: change ""Tracking Cahnges options""
to ""none""."
With Options
.InsertedTextMark = wdInsertedTextMarkNone
.InsertedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkNone
.DeletedTextColor = wdDarkRed
.RevisedPropertiesMark = wdRevisedPropertiesMarkNone
.RevisedPropertiesColor = wdByAuthor
.RevisedLinesMark = wdRevisedLinesMarkNone
.RevisedLinesColor = wdAuto
.CommentsColor = wdByAuthor
.RevisionsBalloonPrintOrientation = wdBalloonPrintOrientationPreserve
End With
ActiveWindow.View.RevisionsMode = wdMixedRevisions
With Options
.MoveFromTextMark = wdMoveFromTextMarkNone
.MoveFromTextColor = wdGreen
.MoveToTextMark = wdMoveToTextMarkNone
.MoveToTextColor = wdGreen
.InsertedCellColor = wdCellColorLightBlue
.MergedCellColor = wdCellColorLightYellow
.DeletedCellColor = wdCellColorPink
.SplitCellColor = wdCellColorLightOrange
End With
With ActiveDocument
.TrackMoves = False
.TrackFormatting = False
End With
Selection.TypeParagraph
Selection.TypeText Text:="result:"
Selection.Range.Case = wdNextCase
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.Range.Case = wdNextCase
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.Range.Case = wdNextCase
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.TypeText Text:= _
" Word's ""deleted"" and ""before"" remain in the text, and lines of
items changed, also!"
End Sub