Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
VBA Code Question
I need to know how to add wdRevisionProperty to this code and have it display
I have a code that takes the insert and delete and extracts it to the track changes documentment I have created. However, how do I get it to display not only the INSERT and DELETED items like below, but also this Do I use an ELSE? ..Cells(3).Range.Text = "Property" 'Apply red color oRow.Range.Font.Color = wdColorRed 'Type of revision If oRevision.Type = wdRevisionInsert Then .Cells(3).Range.Text = "Inserted" 'Apply automatic color (black on white) oRow.Range.Font.Color = wdColorAutomatic Else .Cells(3).Range.Text = "Deleted" 'Apply red color oRow.Range.Font.Color = wdColorRed --- Need to add that code here to add the wdRevisionProperty changes that are tracked. End If |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
VBA Code Question
This post would be better placed in the microsoft.public.word.vba.beginners
group (http://www.microsoft.com/office/comm...a.beginner s). If you have any further questions about this or anything else in your macro, please post there. You can use a construction like this: If oRevision.Type = wdRevisionInsert Then ' do something for inserts ElseIf oRevision.Type = wdRevisionDelete Then ' do something for deletes ElseIf oRevision.Type = wdRevisionProperty Then ' do something for property Else ' it's some other revision -- do nothing End If However, when there are three or more exclusive possibilities, it's more efficient -- and easier to understand and maintain -- to use a Select Case structure like this: Select Case oRevision.Type Case wdRevisionInsert ' do something for inserts Case wdRevisionDelete ' do something for deletes Case wdRevisionProperty ' do something for property Case Else ' it's some other revision -- do nothing End Select On Mon, 2 Jun 2008 11:33:01 -0700, Krumrei wrote: I need to know how to add wdRevisionProperty to this code and have it display I have a code that takes the insert and delete and extracts it to the track changes documentment I have created. However, how do I get it to display not only the INSERT and DELETED items like below, but also this Do I use an ELSE? .Cells(3).Range.Text = "Property" 'Apply red color oRow.Range.Font.Color = wdColorRed 'Type of revision If oRevision.Type = wdRevisionInsert Then .Cells(3).Range.Text = "Inserted" 'Apply automatic color (black on white) oRow.Range.Font.Color = wdColorAutomatic Else .Cells(3).Range.Text = "Deleted" 'Apply red color oRow.Range.Font.Color = wdColorRed --- Need to add that code here to add the wdRevisionProperty changes that are tracked. End If -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2007 Mail Merge: Fill-in Field Code question | Microsoft Word Help | |||
Can Word 2007 apply a zip code bar code to envelopes? | Microsoft Word Help | |||
Field Code Question | Microsoft Word Help | |||
Field Code Question | Microsoft Word Help | |||
Ref Field Code Question | Microsoft Word Help |