Selecting Current Revision Range

S

Sonny Maou

How do I highlight or select the current revision item?

For instance, I have a sentence that has been deleted and shows as
struck-through. If I position my cursor within that sentence, how do I
remove that revision (and just that revision) with VBA (I'll assign the
macro to a keystroke)?

The key is, I can't determine how to reject just that one revision
without first having the user make a selection of text.

Thanks!
 
D

Doug Robbins - Word MVP

Hi Sonny,

The following will undo the revision in which the selection is located:

Selection.Range.Revisions(1).Reject


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
S

Sonny Maou

Doug said:
Hi Sonny,

The following will undo the revision in which the selection is located:

Selection.Range.Revisions(1).Reject

Hey, Doug! Thanks for that suggestion. If I have a paragraph which I've
deleted and shows as struck-through, then I run that code from, say, the
middle of the paragraph, only the strikethrough that appears after the
cursor actually gets rejected. The deleted text prior to the cursor
remains. If I position the cursor at the start of the paragraph, then
run the code, the entire thing gets rejected. Is there a way to
automagically position the cursor at the start of that revision?

I'll simply inform the user that they must be at the start of the
revision to remove it entirely... unless you can figure out how to get
rid of the whole thing.
 
S

Sonny Maou

Doug said:
Hi Sonny,

The following will undo the revision in which the selection is located:

Selection.Range.Revisions(1).Reject

Being inside a table apparently causes havoc. Is there a way to do it
right in a table cell?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top