Re: Track Changes VBA Granular information needed



What you see in the bubble following the "Deleted:" label is just the
..Range.Text property of that Revision. To check whether that is just a
punctuation character, you can do something like this:

Dim oRevision As Revision
For Each oRevision In ActiveDocument.Revisions
With oRevision
If .Type = wdRevisionDelete Then
If .Range.Text = "," Then
MsgBox "Deleted Comma"
ElseIf .Range.Text = "." Then
MsgBox "Deleted Period"
ElseIf .Range.Text = ":" Then
MsgBox "Deleted Colon"
End If
End If
End With
Next

Again, replace the MsgBox statements with statements to put that text into the
proper table cell.

Add more ElseIf clauses for any other punctuation you want to catch. Any
characters that don't have an ElseIf (or if the deleted text was more than just
one character) will show up in the table column that contains .Range.Text.

On Thu, 19 Jun 2008 12:36:01 -0700, Krumrei <Krumrei@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

Ok, one final part of this.

Since Track Changes creates a Delete Bubble on the document, and it pulls
the Delete information of what was deleted, how can I pull say, if I deleted
a punctuation such as a perido, comma, quotes etc etc into my statement
instead of just the phrase Delete?

I would like it to say "Deleted Comma" if it recognized that the
orevision.text was deleted, but was a "," and so forth.

Make sense?


"Jay Freedman" wrote:

Krumrei wrote:
Is there a way to get that Instr string to determine what has been
Deleted?

Say for instance, Track Changes marks a Grammar or Spelling Error as
a delete.

Can I use this to determine if thoat Deleted items was an actual
delete or
if it was marked as deleted due to a spelling or grammar issue?



Thanks!

It doesn't appear that the Revision object contains any information of that
sort. A deletion is a deletion, period.

--
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.
.



Relevant Pages

  • Re: Validating a Field
    ... Private Sub Text0_BeforeUpdate ... Cancel = True ... MsgBox "The First Character of the Book Code Must Be a Letter" ...
    (microsoft.public.access.forms)
  • Re: Guy Macons adventures with ASCII character frequency
    ... > I want a list that includes the space, punctuation, ... > numerals, upper case and lower case, not just letters. ... If you want to determine relative character frequencies ... is easy to do so with a simple computer program. ...
    (sci.crypt)
  • Strange range behavior in a case statement
    ... versions of bash or bourne shell: ... worked on SuSE Linux. ... Every character caused the loop to break. ... not specify a range using punctuation symbols (any ...
    (comp.unix.shell)
  • Re: Filtering only punctuation and currency
    ... > punctuation and currency symbols. ... > of punctuation and currency symbols programatically. ... That's just not how the characters and character classes are ... But it's simple enough to loop over all the 2^16 Java chars, ...
    (comp.lang.java.programmer)
  • Re: Dear Developers, A Noob Question...
    ... are you sure you want the absolute "screen" position? ... first occurance of "graphics" is located 5 cm ... MsgBox Selection.Information ... Quite some times there might not be a character at all. ...
    (microsoft.public.word.vba.general)