#1   Report Post  
Posted to microsoft.public.word.docmanagement
Krumrei Krumrei is offline
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007 Mail Merge: Fill-in Field Code question gr8auntieokie Microsoft Word Help 2 April 11th 08 10:24 PM
Can Word 2007 apply a zip code bar code to envelopes? LINDA Microsoft Word Help 4 January 5th 08 04:45 AM
Field Code Question Me Microsoft Word Help 3 September 12th 07 09:39 PM
Field Code Question Kim Microsoft Word Help 2 February 3rd 06 06:56 AM
Ref Field Code Question David Microsoft Word Help 1 September 23rd 05 06:57 AM


All times are GMT +1. The time now is 01:38 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"