Remove Underline From TrackRevisions in MS Word Table

WonHop
WonHop used Ask the Experts™
on
Hello All.  Is there a way to remove the Underline from TrackRevisions in MS Word.  This code I am using is below.
I have the data in a MS Access Table. The results come from comparing the data in 2 other tables.
 I am adding the results to a table in MS Word. When is is added to the MS Word Table using "TrackRevisions = True", it has an underscore.  
The underscore is fine if it is an "ADD" or "New Term".  If it is a "DELETE" or Term that has been removed, I need to remove the underscore.
I need to keep TrackRevisions on for all ADD and DELETE Terms.  It is turned off for Terms that have a MATCH'

I have attached a photo to show the difference  between VB and VBA.

    If strtxtStatusAAW = "Delete" Then
        objDoc.TrackRevisions = True
        strTrackRevisions = True
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Select
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Strikethrough = True
        blAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Underline = wdUnderlineNone
    End If

Thanks
WonHop
TrackChangesUnderline.JPG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Hello All.  I got it to work.  The key was to set TrackRevisions = True.  Add the data. Add the Strikethrough .
Then set TrackRevisions = False and Add the data again.  It keeps the Strikethrough , but it get rid of the Underline.

    If strtxtStatusAAW = "Delete" Then
        objDoc.TrackRevisions = True
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Select
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Strikethrough = True
        objDoc.TrackRevisions = False
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Color = 204
   End If
Commented:
Hello All.  I got it to work.  The key was to set TrackRevisions = True.  Add the data. Add the Strikethrough .
Then set TrackRevisions = False and Add the data again.  It keeps the Strikethrough , but it get rid of the Underline.

    If strtxtStatusAAW = "Delete" Then
        objDoc.TrackRevisions = True
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Select
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Strikethrough = True
        objDoc.TrackRevisions = False
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
        tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Range.Font.Color = 204
   End If

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial